com.triactive.jdo.store
Class SchemaTable

java.lang.Object
  extended by com.triactive.jdo.store.AbstractTable
      extended by com.triactive.jdo.store.BaseTable
          extended by com.triactive.jdo.store.SchemaTable
All Implemented Interfaces:
Table

 class SchemaTable
extends BaseTable


Field Summary
 
Fields inherited from class com.triactive.jdo.store.AbstractTable
columns, columnsByName, dba, name, state, storeMgr, TABLE_STATE_INITIALIZED, TABLE_STATE_NEW, TABLE_STATE_VALIDATED
 
Fields inherited from interface com.triactive.jdo.store.Table
AUTO_CREATE, TABLE_TYPE_BASE_TABLE, TABLE_TYPE_MISSING, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW, VALIDATE
 
Constructor Summary
SchemaTable(StoreManager storeMgr)
           
 
Method Summary
 void dropAllTables(java.sql.Connection conn)
           
 void dropTablesFor(java.lang.Class[] classes, java.sql.Connection conn)
           
 boolean exists(java.sql.Connection conn)
          Tests if the database table exists.
 java.util.List getAllTableMetadata(boolean descending, java.sql.Connection conn)
           
 java.lang.String getJavaName(int tableID, java.sql.Connection conn)
           
 int getNextOIDHiValue(int tableID, java.sql.Connection conn)
           
 TableMetadata getTableMetadata(MetaData md, java.sql.Connection conn)
          Retrieve the TableMetadata for the given MetaData.
 void initialize()
           
 boolean validate(int flags, java.sql.Connection conn)
           
 
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
 

Constructor Detail

SchemaTable

public SchemaTable(StoreManager storeMgr)
Method Detail

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.