| java.lang.Object com.workingdogs.village.Schema
Schema | final public class Schema (Code) | | The Schema object represents the Columns in a database table. It contains a collection of Column objects.
author: Jon S. Stevens author: John D. McNally version: $Revision: 568 $ |
Constructor Summary | |
public | Schema() |
Schema | public Schema()(Code) | | A blank Schema object
|
attributes | public String attributes()(Code) | | List of columns to select from the table
the list of columns to select from the table |
getAllTableNames | public String[] getAllTableNames()(Code) | | returns all table names that this Schema represents
the table names that this Schema represents |
getColumn | public Column getColumn(String tableName, String colName) throws DataSetException(Code) | | Returns the requested Column object belonging to the specified table by name
Parameters: tableName - Parameters: colName - the requested column, null if a column by the specified name does not exist. exception: DataSetException - |
getColumns | Column[] getColumns()(Code) | | Returns an array of columns
an array of columns |
index | public int index(String colName) throws DataSetException(Code) | | Gets the index position of a named column. If multiple tables are represented and they have columns with the same name,
this method returns the first one listed, if the table name is not specified.
Parameters: colName - the requested column index integer exception: DataSetException - |
isSingleTable | public boolean isSingleTable()(Code) | | Checks to see if this DataSet represents one table in the database.
true if only one table is represented, false otherwise. |
numberOfColumns | public int numberOfColumns()(Code) | | Gets the number of columns in this Schema
integer number of columns |
populate | void populate(ResultSetMetaData meta, String tableName) throws SQLException, DataSetException(Code) | | Internal method which populates this Schema object with Columns.
Parameters: meta - The meta data of the ResultSet used to build this Schema. Parameters: tableName - The name of the table referenced in this schema, or null if unknown or multiple tables are involved. exception: SQLException - exception: DataSetException - |
setAttributes | void setAttributes(String attributes)(Code) | | Sets the columns to select from the table
Parameters: attributes - comma separated list of column names |
setTableName | void setTableName(String tableName)(Code) | | Sets the table name that this Schema represents
Parameters: tableName - |
toString | public String toString()(Code) | | This returns a representation of this Schema
a string |
|
|