|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.workingdogs.village.Schema
public final class Schema
The Schema object represents the Columns in a database table. It contains a collection of Column objects.
Constructor Summary | |
---|---|
Schema()
A blank Schema object |
Method Summary | |
---|---|
String |
attributes()
List of columns to select from the table |
Column |
column(int i)
Returns the requested Column object at index i |
Column |
column(String colName)
Returns the requested Column object by name |
String[] |
getAllTableNames()
returns all table names that this Schema represents |
Column |
getColumn(String colName)
Returns the requested Column object by name |
Column |
getColumn(String tableName,
String colName)
Returns the requested Column object belonging to the specified table by name |
String |
getTableName()
returns the table name that this Schema represents |
int |
index(String colName)
Gets the index position of a named column. |
int |
index(String tableName,
String colName)
Gets the index position of a named column. |
boolean |
isSingleTable()
Checks to see if this DataSet represents one table in the database. |
int |
numberOfColumns()
Gets the number of columns in this Schema |
Schema |
schema(Connection conn,
String tableName)
Creates a Schema with all columns |
Schema |
schema(Connection conn,
String tableName,
String columnsAttribute)
Creates a Schema with the named columns in the columnsAttribute |
String |
tableName()
returns the table name that this Schema represents |
String |
toString()
This returns a representation of this Schema |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Schema()
Method Detail |
---|
public Schema schema(Connection conn, String tableName) throws SQLException, DataSetException
conn
- tableName
-
SQLException
DataSetException
public Schema schema(Connection conn, String tableName, String columnsAttribute) throws SQLException, DataSetException
conn
- tableName
- columnsAttribute
-
SQLException
DataSetException
public String attributes()
public Column column(int i) throws DataSetException
i
-
DataSetException
public Column column(String colName) throws DataSetException
colName
-
DataSetException
public Column getColumn(String colName) throws DataSetException
colName
-
DataSetException
public Column getColumn(String tableName, String colName) throws DataSetException
tableName
- colName
-
DataSetException
public String getTableName() throws DataSetException
DataSetException
- TODO: DOCUMENT ME!public String[] getAllTableNames()
public int index(String colName) throws DataSetException
colName
-
DataSetException
public int index(String tableName, String colName) throws DataSetException
tableName
- colName
-
DataSetException
public boolean isSingleTable()
public int numberOfColumns()
public String tableName() throws DataSetException
DataSetException
- TODO: DOCUMENT ME!public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |