| java.lang.Object org.netbeans.modules.sql.framework.model.impl.AbstractSQLObject org.netbeans.modules.sql.framework.model.impl.AbstractDBTable org.netbeans.modules.sql.framework.model.impl.TargetTableImpl
All known Subclasses: org.netbeans.modules.sql.framework.model.impl.RuntimeOutputImpl,
TargetTableImpl | public class TargetTableImpl extends AbstractDBTable implements TargetTable(Code) | | Concrete implementation of TargetTable and SQLConnectableObject classes / interfaces,
representing table metadata and linking information for a target table.
author: Jonathan Giron version: $Revision$ |
Constructor Summary | |
public | TargetTableImpl() Constructs a new default instance of TargetTableImpl. | public | TargetTableImpl(DBTable src) Constructs a new instance of TargetTable, cloning the contents of the given DBTable
implementation instance. | public | TargetTableImpl(String aName, String aSchema, String aCatalog) Constructs a new instance of TargetTable with the given name. |
Method Summary | |
public boolean | addColumn(TargetColumn aColumn) Adds a TargetColumn instance to this table.
Parameters: aColumn - column to be added. | public void | addInput(String argName, SQLObject newInput) | public Object | clone() Clone a copy of TargetTableImpl. | public void | copyFrom(DBTable source) Sets the various member variables and collections using the given DBTable instance
as a source object. | public TargetColumn | createColumn(String columnName, int jdbcType, int scale, int precision, boolean isPK, boolean isFK, boolean isIndexed, boolean nullable) Convenience class to create DBColumnImpl instance (with the given column name, data
source name, JDBC type, scale, precision, and nullable), and add it to this
TargetTable instance. | public boolean | equals(Object obj) | public List | getChildSQLObjects() Gets list of child sql objects. | protected String | getElementTagName() | public SQLCondition | getFilterCondition() | public String | getFilterConditionText() | public SQLCondition | getHavingCondition() | public SQLInputObject | getInput(String argName) | public Map | getInputObjectMap() | public SQLCondition | getJoinCondition() Gets the target table joinCondition. | public String | getJoinConditionText() Gets joinCondition text. | public SQLJoinView | getJoinView() Gets the single join view which is mapped to this target table in case of multiple
source table mapping to this target table. | public List | getMappedColumns() | public SQLObject | getOutput(String argName) | public SQLGroupBy | getSQLGroupBy() | public SQLObject | getSQLObject(String argName) | public Map | getSQLObjectMap() | public List | getSourceColumnsUsed() | public List | getSourceTableList() Gets the source table list. | public int | getStatementType() Gets the type of statement type for this table. | public String | getStrStatementType() Gets string representation of statement type. | public TargetColumn | getTargetColumn(String columnName) | public List | getTargetColumnsUsed() | public boolean | hasSourceColumn() | public boolean | hasTargetColumn() | public int | hashCode() Overrides default implementation to compute hashCode value for those members used
in equals() for comparison. | public boolean | isCreateTargetTable() Indicates whether to create target table if it does not already exist. | public boolean | isExpressionObject() Indicates whether this is an expression object. | public int | isInputCompatible(String argName, SQLObject input) | public boolean | isInputValid(String argName, SQLObject input) | public boolean | isTruncateBeforeLoad() | public boolean | isUsingFullyQualifiedName() | protected void | parseChildren(NodeList childNodeList) Parses node elements to extract child components to various collections (columns,
PK, FK, indexes). | public SQLObject | removeInputByArgName(String argName, SQLObject sqlObj) | public void | reset() | public void | secondPassParse(Element element) Parses elements which require a second pass to resolve their values. | public void | setBatchSize(int newsize) | public void | setBatchSize(Integer newsize) | public void | setCreateTargetTable(boolean create) Sets whether to create target table if it does not already exist. | public void | setCreateTargetTable(Boolean create) Sets whether to create target table if it does not already exist. | protected void | setDefaultAttributes() Overrides parent implementation to also initialize locally-defined attributes. | public void | setFilterCondition(SQLCondition cond) | public void | setFilterConditionText(String cond) | public void | setHavingCondition(SQLCondition having) | public void | setJoinCondition(SQLCondition cond) Sets the target table joinCondition. | public void | setJoinConditionText(String cond) Sets the joinCondition text. | public void | setSQLGroupBy(SQLGroupBy groupBy) | public void | setStatementType(int sType) Sets the type of statement type for this table. | public void | setStrStatementType(String stType) Sets string representation of statement type. | public void | setTruncateBeforeLoad(boolean flag) | public void | setTruncateBeforeLoad(Boolean flag) | public void | setUsingFullyQualifiedName(boolean usesFullName) | public void | setUsingFullyQualifiedName(Boolean usesFullName) | public String | toXMLString(String prefix, boolean tableOnly) Returns XML representation of table metadata.
Parameters: prefix - prefix for the xml. Parameters: tableOnly - flag for generating table only metadata. | public void | visit(SQLVisitor visitor) | protected void | writeColumns(String prefix, StringBuilder xml) Writes out column information to the given StringBuilder. | protected void | writeForeignKeys(String prefix, StringBuilder xml) Writes out foreign key information to the given StringBuilder. | protected void | writeIndices(String prefix, StringBuilder xml) Writes out index information to the given StringBuilder. | protected void | writePrimaryKey(String prefix, StringBuilder xml) Writes out primary key information to the given StringBuilder. |
ATTR_STATEMENT_TYPE | final public static String ATTR_STATEMENT_TYPE(Code) | | type of statement to generate while loading target table
|
HAVING_CONDITION | final public static String HAVING_CONDITION(Code) | | having condition tag
|
TargetTableImpl | public TargetTableImpl()(Code) | | Constructs a new default instance of TargetTableImpl.
|
TargetTableImpl | public TargetTableImpl(DBTable src)(Code) | | Constructs a new instance of TargetTable, cloning the contents of the given DBTable
implementation instance.
Parameters: src - DBTable instance to be cloned |
TargetTableImpl | public TargetTableImpl(String aName, String aSchema, String aCatalog)(Code) | | Constructs a new instance of TargetTable with the given name.
Parameters: aName - name of new DBTable instance Parameters: aSchema - schema of new DBTable instance; may be null Parameters: aCatalog - catalog of new DBTable instance; may be null |
addColumn | public boolean addColumn(TargetColumn aColumn)(Code) | | Adds a TargetColumn instance to this table.
Parameters: aColumn - column to be added. true if successful. false if failed. |
clone | public Object clone()(Code) | | Clone a copy of TargetTableImpl.
a copy of TargetTableImpl. |
copyFrom | public void copyFrom(DBTable source)(Code) | | Sets the various member variables and collections using the given DBTable instance
as a source object. Concrete implementations should override this method, call
super.copyFrom(DBColumn) to pick up member variables defined in this class and then
implement its own logic for copying member variables defined within itself.
Parameters: source - DBTable from which to obtain values for member variables andcollections |
createColumn | public TargetColumn createColumn(String columnName, int jdbcType, int scale, int precision, boolean isPK, boolean isFK, boolean isIndexed, boolean nullable)(Code) | | Convenience class to create DBColumnImpl instance (with the given column name, data
source name, JDBC type, scale, precision, and nullable), and add it to this
TargetTable instance.
Parameters: columnName - Column name Parameters: jdbcType - JDBC type defined in SQL.Types Parameters: scale - Scale Parameters: precision - Precision Parameters: isPK - true if part of primary key, false otherwise Parameters: isFK - true if part of foreign key, false otherwise Parameters: isIndexed - true if indexed, false otherwise Parameters: nullable - Nullable new DBColumnImpl instance |
getChildSQLObjects | public List getChildSQLObjects()(Code) | | Gets list of child sql objects.
child sql objects |
getFilterConditionText | public String getFilterConditionText()(Code) | | |
getJoinCondition | public SQLCondition getJoinCondition()(Code) | | Gets the target table joinCondition.
target table conidiotn |
getJoinConditionText | public String getJoinConditionText()(Code) | | Gets joinCondition text.
sql joinCondition |
getJoinView | public SQLJoinView getJoinView()(Code) | | Gets the single join view which is mapped to this target table in case of multiple
source table mapping to this target table.
associated SQLJoinView, if any. |
getMappedColumns | public List getMappedColumns()(Code) | | |
getSourceColumnsUsed | public List getSourceColumnsUsed()(Code) | | |
getSourceTableList | public List getSourceTableList() throws BaseException(Code) | | Gets the source table list.
List of all source tables throws: BaseException - if error occurs while getting Source Table List |
getStatementType | public int getStatementType()(Code) | | Gets the type of statement type for this table.
statement type |
getStrStatementType | public String getStrStatementType()(Code) | | Gets string representation of statement type.
statement type |
getTargetColumn | public TargetColumn getTargetColumn(String columnName)(Code) | | Gets the TargetColumn, if any, associated with the given name
Parameters: columnName - column name TargetColumn associated with columnName, or null if none exists |
getTargetColumnsUsed | public List getTargetColumnsUsed()(Code) | | |
hasSourceColumn | public boolean hasSourceColumn()(Code) | | |
hasTargetColumn | public boolean hasTargetColumn()(Code) | | |
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 |
isCreateTargetTable | public boolean isCreateTargetTable()(Code) | | Indicates whether to create target table if it does not already exist.
whether to create target table |
isExpressionObject | public boolean isExpressionObject()(Code) | | Indicates whether this is an expression object.
true if the object is a Expression Object |
isUsingFullyQualifiedName | public boolean isUsingFullyQualifiedName()(Code) | | |
parseChildren | protected void parseChildren(NodeList childNodeList) throws BaseException(Code) | | Parses node elements to extract child components to various collections (columns,
PK, FK, indexes).
Parameters: childNodeList - Nodes to be unmarshalled throws: BaseException - if error occurs while parsing |
reset | public void reset()(Code) | | Clear all column references
|
secondPassParse | public void secondPassParse(Element element) throws BaseException(Code) | | Parses elements which require a second pass to resolve their values.
Parameters: element - DOM element containing XML marshalled version of this SQLObjectinstance throws: BaseException - if element is null or error occurs during parsing |
setBatchSize | public void setBatchSize(int newsize)(Code) | | |
setCreateTargetTable | public void setCreateTargetTable(boolean create)(Code) | | Sets whether to create target table if it does not already exist.
Parameters: create - whether to create target table |
setCreateTargetTable | public void setCreateTargetTable(Boolean create)(Code) | | Sets whether to create target table if it does not already exist.
Parameters: create - whether to create target table |
setDefaultAttributes | protected void setDefaultAttributes()(Code) | | Overrides parent implementation to also initialize locally-defined attributes.
|
setFilterConditionText | public void setFilterConditionText(String cond)(Code) | | |
setJoinCondition | public void setJoinCondition(SQLCondition cond)(Code) | | Sets the target table joinCondition.
Parameters: cond - target table joinCondition |
setJoinConditionText | public void setJoinConditionText(String cond)(Code) | | Sets the joinCondition text.
Parameters: cond - sql joinCondition |
setStatementType | public void setStatementType(int sType)(Code) | | Sets the type of statement type for this table.
Parameters: sType - statement type |
setStrStatementType | public void setStrStatementType(String stType)(Code) | | Sets string representation of statement type.
Parameters: stType - statement type |
setTruncateBeforeLoad | public void setTruncateBeforeLoad(Boolean flag)(Code) | | |
setUsingFullyQualifiedName | public void setUsingFullyQualifiedName(boolean usesFullName)(Code) | | |
setUsingFullyQualifiedName | public void setUsingFullyQualifiedName(Boolean usesFullName)(Code) | | |
toXMLString | public String toXMLString(String prefix, boolean tableOnly) throws BaseException(Code) | | Returns XML representation of table metadata.
Parameters: prefix - prefix for the xml. Parameters: tableOnly - flag for generating table only metadata. XML representation of the table metadata. throws: BaseException - if error occurs |
writeColumns | protected void writeColumns(String prefix, StringBuilder xml) throws BaseException(Code) | | Writes out column information to the given StringBuilder.
Parameters: prefix - String to prepend to each column element or child node Parameters: xml - StringBuilder in which to write column information throws: BaseException - if error occurs during writing |
writeForeignKeys | protected void writeForeignKeys(String prefix, StringBuilder xml)(Code) | | Writes out foreign key information to the given StringBuilder.
Parameters: prefix - String to prepend to each foreign key element or child node Parameters: xml - StringBuilder in which to write foreign key information |
writeIndices | protected void writeIndices(String prefix, StringBuilder xml)(Code) | | Writes out index information to the given StringBuilder.
Parameters: prefix - String to prepend to each index element or child node Parameters: xml - StringBuilder in which to write index information |
writePrimaryKey | protected void writePrimaryKey(String prefix, StringBuilder xml)(Code) | | Writes out primary key information to the given StringBuilder.
Parameters: prefix - String to prepend to each primary key element or child node Parameters: xml - StringBuilder in which to write primary key information |
|
|