com.triactive.jdo.store
Class SchemaTable
java.lang.Object
com.triactive.jdo.store.AbstractTable
com.triactive.jdo.store.BaseTable
com.triactive.jdo.store.SchemaTable
- All Implemented Interfaces:
- Table
class SchemaTable
- extends BaseTable
Methods inherited from class com.triactive.jdo.store.BaseTable |
create, drop, dropConstraints, getExpectedForeignKeys, getExpectedIndices, getExpectedPrimaryKey, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, validateConstraints |
Methods inherited from class com.triactive.jdo.store.AbstractTable |
addColumn, assertIsInitialized, assertIsUninitialized, assertIsValidated, equals, executeStatementList, getName, getSchemaName, getStoreManager, hasColumnName, hashCode, isInitialized, isValidated, newColumn, newColumn, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SchemaTable
public SchemaTable(StoreManager storeMgr)
initialize
public void initialize()
validate
public boolean validate(int flags,
java.sql.Connection conn)
throws java.sql.SQLException
- Specified by:
validate
in interface Table
- Overrides:
validate
in class BaseTable
- Throws:
java.sql.SQLException
exists
public boolean exists(java.sql.Connection conn)
throws java.sql.SQLException
- Description copied from class:
AbstractTable
- Tests if the database table exists.
- Specified by:
exists
in interface Table
- Overrides:
exists
in class AbstractTable
- Parameters:
conn
- a JDBC connection to the database.
- Returns:
- true if the table exists in the database,
false otherwise.
- Throws:
java.sql.SQLException
getTableMetadata
public TableMetadata getTableMetadata(MetaData md,
java.sql.Connection conn)
throws java.sql.SQLException,
MissingSchemaTableEntryException
- Retrieve the TableMetadata for the given MetaData. If the TableMetaData is
not found in the SchemaTable and
tableValidationFlags
do not
specify AUTO_CREATE, a MissingSchemaTableEntryException
is thrown.
- Parameters:
md
- The MetaData to retrieve the TableMetaData for.conn
- The Connection to use.
- Returns:
- The TableMetadata for the given MetaData.
- Throws:
java.sql.SQLException
- If inserting the TableMetadata into the SchemaTable failed.
MissingSchemaTableEntryException
- The the SchemaTable does not contain a row for the requested MetaData, and
tableValidationFlags
does not specifiy AUTO_CREATE.
getJavaName
public java.lang.String getJavaName(int tableID,
java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getNextOIDHiValue
public int getNextOIDHiValue(int tableID,
java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getAllTableMetadata
public java.util.List getAllTableMetadata(boolean descending,
java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
dropTablesFor
public void dropTablesFor(java.lang.Class[] classes,
java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
dropAllTables
public void dropAllTables(java.sql.Connection conn)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright ? 2001 TriActive, Inc. All Rights Reserved.