| org.netbeans.modules.sql.framework.model.impl.AbstractDBTable org.netbeans.modules.mashup.db.model.impl.FlatfileDBTableImpl
FlatfileDBTableImpl | public class FlatfileDBTableImpl extends AbstractDBTable implements FlatfileDBTable,Cloneable,Comparable(Code) | | Reference implementation for interface org.netbeans.modules.etl.model.DBTable
author: Jonathan Giron author: Girish Patil author: Ahimanikya Satapathy version: $Revision$ |
Method Summary | |
public boolean | addColumn(SQLDBColumn theColumn) Adds a DBColumn instance to this table.
Parameters: theColumn - column to be added. | public Object | clone() Clone a deep copy of DBTable. | public int | compareTo(Object refObj) Compares DBTable with another object for lexicographical ordering. | public void | copyFrom(DBTable source) Performs deep copy of contents of given DBTable. | public void | copyFrom(FlatfileDBTable source) Performs deep copy of contents of given FlatfileDBTable. | public FlatfileDBColumn | createColumn(String columnName, int jdbcType, int scale, int precision, boolean isPK, boolean isFK, boolean isIndexed, boolean nullable) Convenience class to create FlatfileDBColumnImpl instance (with the given column
name, data source name, JDBC type, scale, precision, and nullable), and add it to
this FlatfileDBTableImpl instance. | protected void | deepCopyReferences(DBTable source) Perform deep copy of columns. | public boolean | equals(Object obj) Overrides default implementation to return value based on memberwise comparison. | public String | getCatalog() | public String | getCreateStatementSQL() | public String | getCreateStatementSQL(SQLDBTable table) Gets the SQL create statement to create a text table representing this flatfile. | public static String | getCreateStatementSQL(SQLDBTable table, String generatedName) Gets the SQL create statement to create a text table representing this flatfile. | public String | getCreateStatementSQL(String directory, String theTableName, String runtimeName, boolean isDynamicFilePath, boolean createDataFileIfNotExist) Gets the SQL create statement to create a text table representing this flatfile. | public String | getDropStatementSQL() | public static String | getDropStatementSQL(String generatedTableName) | public static String | getDropStatementSQL(SQLDBTable table) Gets the SQL Drop statement to drop the text table representing this flatfile. | protected String | getElementTagName() | public String | getEncodingScheme() Gets the encoding scheme. | public String | getFileName() Gets the file name. | public String | getFlatfilePropertiesSQL() | public String | getLocalFilePath() Gets local path to sample file. | public String | getParserType() Gets parse type, if any, associated with this flatfile. | public Map | getProperties() | public String | getProperty(String key) Gets property string associated with the given name. | public String | getSchema() | public String | getSelectStatementSQL(int rows) Gets the SQL select statement to retrieve a result set displaying this file's
contents, using the given value as a limit to the number of rows returned. | public String | getTableName() Gets the table name. | public int | hashCode() Overrides default implementation to compute hashCode value for those members used
in equals() for comparison. | protected void | parseChildren(NodeList childNodeList) | protected void | parseColumns(Element mapNode) | protected void | parseProperties(Element mapNode) | public void | parseXML(Element xmlElement) | public void | setEncodingScheme(String newEncoding) Sets the encoding scheme. | public void | setFileName(String newName) Sets the file name. | public void | setLocalFilePath(File localFile) Sets local path to sample file.
Parameters: localFile - File representing path to sample file. | public void | setOrPutProperty(String key, Object value) | public void | setParseType(String type) Sets MutableParseConfigurator instance associated with this flatfile. | public void | setProperties(Map newProps) | public boolean | setProperty(String key, Object value) Sets the property associated with the given String key to the given value. | void | setTableDefinition(Map props) | public String | toString() Overrides default implementation to return fully-qualified name of this DBTable
(including name of parent DatabaseModel). | public String | toXMLString(String prefix) Marshall this object to XML string. | public String | toXMLString(String prefix, boolean tableOnly) | public void | updateProperties(Map newProps) |
FlatfileDBTableImpl | public FlatfileDBTableImpl()(Code) | | |
FlatfileDBTableImpl | public FlatfileDBTableImpl(DBTable src)(Code) | | Creates a new instance of FlatfileDBTableImpl, cloning the contents of the given
DBTable implementation instance.
Parameters: src - DBTable instance to be cloned |
FlatfileDBTableImpl | public FlatfileDBTableImpl(FlatfileDBTable src)(Code) | | Creates a new instance of FlatfileDBTableImpl, cloning the contents of the given
FlatfileDBTable implementation instance.
Parameters: src - FlatfileDBTable instance to be cloned |
FlatfileDBTableImpl | public FlatfileDBTableImpl(String aName)(Code) | | |
FlatfileDBTableImpl | public FlatfileDBTableImpl(String aName, String aSchema, String aCatalog)(Code) | | Creates a new instance of FlatfileDBTableImpl 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(SQLDBColumn theColumn)(Code) | | Adds a DBColumn instance to this table.
Parameters: theColumn - column to be added. true if successful. false if failed. |
clone | public Object clone()(Code) | | Clone a deep copy of DBTable.
a copy of DBTable. |
compareTo | public int compareTo(Object refObj)(Code) | | Compares DBTable with another object for lexicographical ordering. Null objects and
those DBTables with null names are placed at the end of any ordered collection
using this method.
Parameters: refObj - Object to be compared. -1 if the column name is less than obj to be compared. 0 if the column nameis the same. 1 if the column name is greater than obj to be compared. |
copyFrom | public void copyFrom(DBTable source)(Code) | | Performs deep copy of contents of given DBTable. We deep copy (that is, the method
clones all child objects such as columns) because columns have a parent-child
relationship that must be preserved internally.
Parameters: source - DBTable providing contents to be copied. |
copyFrom | public void copyFrom(FlatfileDBTable source)(Code) | | Performs deep copy of contents of given FlatfileDBTable. We deep copy (that is, the
method clones all child objects such as columns) because columns have a
parent-child relationship that must be preserved internally.
Parameters: source - FlatfileDBTable providing contents to be copied. |
createColumn | public FlatfileDBColumn createColumn(String columnName, int jdbcType, int scale, int precision, boolean isPK, boolean isFK, boolean isIndexed, boolean nullable)(Code) | | Convenience class to create FlatfileDBColumnImpl instance (with the given column
name, data source name, JDBC type, scale, precision, and nullable), and add it to
this FlatfileDBTableImpl 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 FlatfileDBColumnImpl instance |
deepCopyReferences | protected void deepCopyReferences(DBTable source)(Code) | | Perform deep copy of columns.
Parameters: source - ETLTable whose columns are to be copied. |
equals | public boolean equals(Object obj)(Code) | | Overrides default implementation to return value based on memberwise comparison.
Parameters: obj - Object against which we compare this instance true if obj is functionally identical to this ETLTable instance; falseotherwise |
getCatalog | public String getCatalog()(Code) | | See Also: org.netbeans.modules.model.database.DBTable.getCatalog |
getCreateStatementSQL | public String getCreateStatementSQL()(Code) | | Gets the Create Statement SQL for creating table for a flat file
SQL for this Flatfile with getTableName() |
getCreateStatementSQL | public String getCreateStatementSQL(SQLDBTable table)(Code) | | Gets the SQL create statement to create a text table representing this flatfile.
Parameters: table - to use in synthesizing the create statement; if null,the current table name yielded by getName() will be used SQL statement to create a text table representing the contents of thisflatfile |
getCreateStatementSQL | public static String getCreateStatementSQL(SQLDBTable table, String generatedName)(Code) | | Gets the SQL create statement to create a text table representing this flatfile.
Parameters: table - to use in synthesizing the create statement; if null,the current table name yielded by getName() will be used SQL statement to create a text table representing the contents of thisflatfile |
getCreateStatementSQL | public String getCreateStatementSQL(String directory, String theTableName, String runtimeName, boolean isDynamicFilePath, boolean createDataFileIfNotExist)(Code) | | Gets the SQL create statement to create a text table representing this flatfile.
SQL statement to create a text table representing the contents of thisflatfile |
getDropStatementSQL | public String getDropStatementSQL()(Code) | | |
getDropStatementSQL | public static String getDropStatementSQL(String generatedTableName)(Code) | | |
getDropStatementSQL | public static String getDropStatementSQL(SQLDBTable table)(Code) | | Gets the SQL Drop statement to drop the text table representing this flatfile.
Parameters: table - table to use in synthesizing the drop statement; if null,uses the value yielded by getName() SQLstatement to drop a text table representing the contents of thisflatfile |
getEncodingScheme | public String getEncodingScheme()(Code) | | Gets the encoding scheme.
encoding scheme |
getFileName | public String getFileName()(Code) | | Gets the file name.
file name |
getFlatfilePropertiesSQL | public String getFlatfilePropertiesSQL()(Code) | | |
getLocalFilePath | public String getLocalFilePath()(Code) | | Gets local path to sample file.
path (in local workstation file system) to file, excluding the filename. |
getParserType | public String getParserType()(Code) | | Gets parse type, if any, associated with this flatfile. To set this type, call
setParseConfigurator with an appropriate ParseConfigurator instance from the
ParseConfiguratorFactory.
String representing parse type, or null if none has been defined for thisflatfile. |
getProperties | public Map getProperties()(Code) | | |
getProperty | public String getProperty(String key)(Code) | | Gets property string associated with the given name.
Parameters: key - property key property associated with propName, or null if no such property exists. |
getSchema | public String getSchema()(Code) | | See Also: org.netbeans.modules.model.database.DBTable.getSchema |
getSelectStatementSQL | public String getSelectStatementSQL(int rows)(Code) | | Gets the SQL select statement to retrieve a result set displaying this file's
contents, using the given value as a limit to the number of rows returned.
Parameters: rowCount - number of rows to display; 0 returns all available rows SQL statement to select the contents of this file in the column orderspecified by this instance's FlatfileFields. |
getTableName | public String getTableName()(Code) | | Gets the table name.
Table name |
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 |
parseChildren | protected void parseChildren(NodeList childNodeList) throws BaseException(Code) | | |
parseColumns | protected void parseColumns(Element mapNode) throws BaseException(Code) | | |
parseProperties | protected void parseProperties(Element mapNode)(Code) | | |
parseXML | public void parseXML(Element xmlElement) throws BaseException(Code) | | |
setEncodingScheme | public void setEncodingScheme(String newEncoding)(Code) | | Sets the encoding scheme.
Parameters: newEncoding - encoding scheme |
setFileName | public void setFileName(String newName)(Code) | | Sets the file name.
Parameters: newName - new file name |
setLocalFilePath | public void setLocalFilePath(File localFile)(Code) | | Sets local path to sample file.
Parameters: localFile - File representing path to sample file. If localFile represents thefile itself, only the directory path will be stored. |
setParseType | public void setParseType(String type)(Code) | | Sets MutableParseConfigurator instance associated with this flatfile.
Parameters: newConfig - new MutableParseConfigurator to associate |
setProperties | public void setProperties(Map newProps)(Code) | | |
setProperty | public boolean setProperty(String key, Object value)(Code) | | Sets the property associated with the given String key to the given value.
Parameters: key - key whose associated value is sought Parameters: value - to associate with key |
setTableDefinition | void setTableDefinition(Map props)(Code) | | |
toString | public String toString()(Code) | | Overrides default implementation to return fully-qualified name of this DBTable
(including name of parent DatabaseModel).
table name. |
toXMLString | public String toXMLString(String prefix) throws BaseException(Code) | | Marshall this object to XML string.
Parameters: prefix - XML string |
toXMLString | public String toXMLString(String prefix, boolean tableOnly) throws BaseException(Code) | | |
updateProperties | public void updateProperties(Map newProps)(Code) | | |
|
|