| java.lang.Object org.netbeans.modules.sql.framework.model.impl.AbstractSQLObject org.netbeans.modules.sql.framework.model.impl.SQLDBModelImpl
All known Subclasses: org.netbeans.modules.mashup.db.model.impl.FlatfileDatabaseModelImpl, org.netbeans.modules.sql.framework.model.impl.RuntimeDatabaseModelImpl,
SQLDBModelImpl | public class SQLDBModelImpl extends AbstractSQLObject implements Cloneable,SQLDBModel(Code) | | SQLBuilder-specific concrete implementation of DatabaseModel interface.
author: Jonathan Giron version: $Revision$ |
Method Summary | |
public void | addTable(SQLDBTable table) Adds table to this instance. | public void | clearOverride(boolean clearCatalogOverride, boolean clearSchemaOverride) | public Object | clone() Clones this object. | public boolean | containsTable(SQLDBTable table) | public void | copyFrom(DatabaseModel src) Copies member values to those contained in the given DatabaseModel
instance. | public void | copyFrom(DatabaseModel src, int objType) Copies member values to those contained in the given DatabaseModel
instance, using the given value for object type. | public DBTable | createTable(String tableName, String schemaName, String catalogName) Create DBTable instance with the given table, schema, and catalog names. | public boolean | deleteAllTables() Deletes all tables associated with this data source. | public boolean | deleteTable(String fqTableName) Delete table from the SQLDataSource
Parameters: fqTableName - fully qualified name of table to be deleted. | public boolean | equals(Object refObj) | public synchronized Map | getAllSQLTables() | public List | getAllTables(String tableName, String schemaName, String catalogName) | public List | getChildSQLObjects() Gets List of child SQLObjects belonging to this instance. | public DBConnectionDefinition | getConnectionDefinition() | public DBConnectionDefinition | getETLDBConnectionDefinition() | public String | getFooter() | public String | getFullyQualifiedTableName(DBTable tbl) | public String | getFullyQualifiedTableName(String tblName, String schName, String catName) | public String | getHeader() | public String | getModelDescription() | public String | getModelName() | public SQLObject | getObject(String objectId) Gets SQLObject, if any, having the given object ID. | public String | getRefKey() | public ETLObject | getSource() Gets repository object, if any, providing underlying data for this
DatabaseModel implementation. | public DBTable | getTable(String fqTableName) | public DBTable | getTable(String tableName, String schemaName, String catalogName) | public Map | getTableMap() Gets a read-only Map of table names to available DBTable instances in
this model. | public HashMap<String, Property> | getTableMetaData(DBConnectionDefinition conndef, SQLDBTable element) | public List | getTables() | public int | hashCode() Overrides default implementation to compute hashCode value for those
members used in equals() for comparison. | public void | overrideCatalogNames(Map catalogOverride) | public void | overrideSchemaNames(Map schemaOverride) | protected void | parseSourceTables(NodeList tableNodeList) Extracts SourceTable instances from the given NodeList. | protected void | parseTargetTables(NodeList tableNodeList) Extracts TargetTable instances from the given NodeList. | public void | parseXML(Element dbElement) Parses the XML content, if any, using the given Element as a source for
reconstituting the member variables and collections of this instance. | public void | setConnectionDefinition(DBConnectionDefinition dbConnectionDef) | public void | setDescription(String newDesc) | public void | setModelName(String name) | public void | setRefKey(String aKey) | public void | setSQLFrameworkParentObject(SQLFrameworkParentObject aParent) | public void | setSource(ETLObject obj) Sets repository object, if any, providing underlying data for this
DatabaseModel implementation. | public String | toString() Overrides default implementation to return name of this DatabaseModel. | public String | toXMLString(String prefix) Gets xml representation of this DatabaseModel instance.
Parameters: prefix - for this xml. | protected void | writeTables(String prefix, StringBuilder xml) |
INIT_XMLBUF_SIZE | final protected static int INIT_XMLBUF_SIZE(Code) | | Initial buffer size for StringBuilder used in marshaling Databases to XML
|
description | protected volatile String description(Code) | | User-supplied description
|
tables | protected Map tables(Code) | | Map of DBTable instances
|
SQLDBModelImpl | public SQLDBModelImpl()(Code) | | Constructs a new default instance of SQLDBModelImpl.
|
SQLDBModelImpl | public SQLDBModelImpl(int type)(Code) | | |
clearOverride | public void clearOverride(boolean clearCatalogOverride, boolean clearSchemaOverride)(Code) | | |
clone | public Object clone()(Code) | | Clones this object.
shallow copy of this SQLDataSource |
containsTable | public boolean containsTable(SQLDBTable table)(Code) | | check if a table exists This will check if a table is in database model,
|
copyFrom | public void copyFrom(DatabaseModel src)(Code) | | Copies member values to those contained in the given DatabaseModel
instance.
Parameters: src - DatabaseModel whose contents are to be copied into thisinstance |
copyFrom | public void copyFrom(DatabaseModel src, int objType)(Code) | | Copies member values to those contained in the given DatabaseModel
instance, using the given value for object type.
Parameters: src - DatabaseModel whose contents are to be copied into thisinstance Parameters: objType - type of object (SOURCE_DBMODEL or TARGET_DBMODEL) |
createTable | public DBTable createTable(String tableName, String schemaName, String catalogName)(Code) | | Create DBTable instance with the given table, schema, and catalog names.
Parameters: tableName - table name of new table Parameters: schemaName - schema name of new table Parameters: catalogName - catalog name of new table an instance of SQLTable if successful, null if failed. |
deleteAllTables | public boolean deleteAllTables()(Code) | | Deletes all tables associated with this data source.
true if all tables were deleted successfully, false otherwise. |
deleteTable | public boolean deleteTable(String fqTableName)(Code) | | Delete table from the SQLDataSource
Parameters: fqTableName - fully qualified name of table to be deleted. true if successful. false if failed. |
getAllSQLTables | public synchronized Map getAllSQLTables()(Code) | | Gets the allTables attribute of the SQLDataSource object
The allTables value |
getAllTables | public List getAllTables(String tableName, String schemaName, String catalogName)(Code) | | get a list of tables based on table name, schema name and catalog name
since we allow duplicate tables this will return a list of tables
|
getChildSQLObjects | public List getChildSQLObjects()(Code) | | Gets List of child SQLObjects belonging to this instance.
List of child SQLObjects |
getConnectionDefinition | public DBConnectionDefinition getConnectionDefinition()(Code) | | Gets SQLDBConnectionDefinition of the SQLDataSource object
ConnectionDefinition of the SQLDataSource object |
getETLDBConnectionDefinition | public DBConnectionDefinition getETLDBConnectionDefinition() throws BaseException(Code) | | Gets SQLDBConnectionDefinition of the SQLDataSource object
ConnectionDefinition of the SQLDataSource object |
getFullyQualifiedTableName | public String getFullyQualifiedTableName(DBTable tbl)(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getFullyQualifiedTableName(DBTable) |
getFullyQualifiedTableName | public String getFullyQualifiedTableName(String tblName, String schName, String catName)(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getFullyQualifiedTableName(java.lang.Stringjava.lang.Stringjava.lang.String) |
getModelDescription | public String getModelDescription()(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getModelDescription |
getModelName | public String getModelName()(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getModelName |
getObject | public SQLObject getObject(String objectId)(Code) | | Gets SQLObject, if any, having the given object ID.
Parameters: objectId - ID of SQLObject being sought SQLObject associated with objectID, or null if no such objectexists. |
getSource | public ETLObject getSource()(Code) | | Gets repository object, if any, providing underlying data for this
DatabaseModel implementation.
ETLObject hosting this object's metadata, or null if data are notheld by a ETLObject. |
getTable | public DBTable getTable(String fqTableName)(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getTable(java.lang.String) See Also: fully qualified name should be catalog.schema.table.id |
getTable | public DBTable getTable(String tableName, String schemaName, String catalogName)(Code) | | NOTE: This method will return first matching table, since now we allow
duplicate tables, so if you want to get specific table use
getFullyQualifiedTableName(DBTable tbl) to generate a qualified name
which includes object id then call getTable(fqName)
See Also: org.netbeans.modules.model.database.DatabaseModel.getTable(java.lang.Stringjava.lang.Stringjava.lang.String) |
getTableMap | public Map getTableMap()(Code) | | Gets a read-only Map of table names to available DBTable instances in
this model.
readonly Map of table names to DBTable instances |
getTables | public List getTables()(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getTables |
hashCode | public int hashCode()(Code) | | Overrides default implementation to compute hashCode value for those
members used in equals() for comparison.
hash code for this object See Also: java.lang.Object.hashCode |
overrideCatalogNames | public void overrideCatalogNames(Map catalogOverride)(Code) | | |
overrideSchemaNames | public void overrideSchemaNames(Map schemaOverride)(Code) | | |
parseSourceTables | protected void parseSourceTables(NodeList tableNodeList) throws BaseException(Code) | | Extracts SourceTable instances from the given NodeList.
Parameters: tableNodeList - Nodes to be unmarshaled throws: BaseException - if error occurs while parsing |
parseTargetTables | protected void parseTargetTables(NodeList tableNodeList) throws BaseException(Code) | | Extracts TargetTable instances from the given NodeList.
Parameters: tableNodeList - Nodes to be unmarshaled throws: BaseException - if error occurs while parsing |
parseXML | public void parseXML(Element dbElement) throws BaseException(Code) | | Parses the XML content, if any, using the given Element as a source for
reconstituting the member variables and collections of this instance.
Parameters: dbElement - DOM element containing XML marshalled version of a exception: BaseException - thrown while parsing XML, or if member variable element isnull |
setDescription | public void setDescription(String newDesc)(Code) | | Sets the description string of this DatabaseModel
Parameters: newDesc - new description string |
setModelName | public void setModelName(String name)(Code) | | See Also: org.netbeans.modules.model.database.DatabaseModel.getModelName |
setSource | public void setSource(ETLObject obj)(Code) | | Sets repository object, if any, providing underlying data for this
DatabaseModel implementation.
Parameters: obj - Object hosting this object's metadata, or null if data are notheld by a ETLObject. |
toString | public String toString()(Code) | | Overrides default implementation to return name of this DatabaseModel.
model name. |
toXMLString | public String toXMLString(String prefix) throws BaseException(Code) | | Gets xml representation of this DatabaseModel instance.
Parameters: prefix - for this xml. Return the xml representation of data source metadata. exception: BaseException - -exception |
writeTables | protected void writeTables(String prefix, StringBuilder xml) throws BaseException(Code) | | Write table
Parameters: prefix - -prefix Parameters: xml - -StringBuilder throws: BaseException - -exception |
|
|