com.triactive.jdo.store.sql
Class SchemaTable

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

public class SchemaTable
extends BaseTable


Field Summary
 
Fields inherited from class com.triactive.jdo.store.sql.BaseTable
columnsByName, dba, name, state, TABLE_STATE_CONSTRAINTS_FROZEN, TABLE_STATE_CONSTRAINTS_INITIALIZED, TABLE_STATE_INITIALIZED, TABLE_STATE_NEW, TABLE_STATE_VALIDATED
 
Fields inherited from interface com.triactive.jdo.store.sql.Table
TABLE_TYPE_BASE_TABLE, TABLE_TYPE_MISSING, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW
 
Constructor Summary
SchemaTable(DatabaseAdapter dba)
           
SchemaTable(SchemaName schemaName, DatabaseAdapter dba)
           
 
Method Summary
 void dropAllTables(StoreManager.MgmtTransaction mtx)
           
 void dropTablesFor(java.lang.Class[] classes, StoreManager.MgmtTransaction mtx)
           
 boolean exists(StoreManager.MgmtTransaction mtx)
          Tests if the database table exists.
 java.util.List getAllTableMetadata(StoreManager.MgmtTransaction mtx)
           
 java.util.List getAllTableMetadata(java.lang.String ascOrDesc, StoreManager.MgmtTransaction mtx)
           
 java.lang.String getJavaName(int tableID, StoreManager.MgmtTransaction mtx)
           
 int getNextOIDHiValue(int tableID, StoreManager.MgmtTransaction mtx)
           
 SchemaName getSchemaName()
           
 TableMetadata getTableMetadata(MetaData md, StoreManager.MgmtTransaction mtx)
          Retrieve the TableMetadata for the given MetaData.
 void initialize(StoreManager.MgmtTransaction mtx)
           
 void initializeConstraints(StoreManager.MgmtTransaction mtx)
           
 
Methods inherited from class com.triactive.jdo.store.sql.BaseTable
addCandidateKey, addColumn, addForeignKey, addIndex, assertConstraintsInitialized, assertConstraintsNotFrozen, assertConstraintsUninitialized, assertIsInitialized, assertIsUninitialized, assertIsValidated, constraintsFrozen, constraintsInitialized, create, drop, dropConstraints, equals, getDatabaseAdapter, getName, getSqlAddFKStatements, getSqlCreateIndexStatements, getSqlCreateStatements, getSqlDropStatements, hasColumnName, hashCode, intern, isInitialized, isValidated, newColumn, newColumn, setPrimaryKey, toString, validate, validateConstraints
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaTable

public SchemaTable(DatabaseAdapter dba)

SchemaTable

public SchemaTable(SchemaName schemaName,
                   DatabaseAdapter dba)
Method Detail

getSchemaName

public SchemaName getSchemaName()

initialize

public void initialize(StoreManager.MgmtTransaction mtx)
Specified by:
initialize in interface Table
Overrides:
initialize in class BaseTable

initializeConstraints

public void initializeConstraints(StoreManager.MgmtTransaction mtx)
Overrides:
initializeConstraints in class BaseTable

exists

public boolean exists(StoreManager.MgmtTransaction mtx)
               throws java.sql.SQLException
Description copied from interface: Table
Tests if the database table exists.

Throws:
java.sql.SQLException

getTableMetadata

public TableMetadata getTableMetadata(MetaData md,
                                      StoreManager.MgmtTransaction mtx)
                               throws java.sql.SQLException,
                                      MissingSchemaTableEntryException
Retrieve the TableMetadata for the given MetaData. If the TableMetaData is not found and the options do not specify autoCreateTables, a MissingSchemaTableEntryException is thrown.

Parameters:
md - The MetaData to retrieve the TableMetaData for.
mtx - The surrounding management transaction in which this operation is being performed.
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 the options do not specify auto-create.

getJavaName

public java.lang.String getJavaName(int tableID,
                                    StoreManager.MgmtTransaction mtx)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

getNextOIDHiValue

public int getNextOIDHiValue(int tableID,
                             StoreManager.MgmtTransaction mtx)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getAllTableMetadata

public java.util.List getAllTableMetadata(StoreManager.MgmtTransaction mtx)
                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

getAllTableMetadata

public java.util.List getAllTableMetadata(java.lang.String ascOrDesc,
                                          StoreManager.MgmtTransaction mtx)
                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

dropTablesFor

public void dropTablesFor(java.lang.Class[] classes,
                          StoreManager.MgmtTransaction mtx)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

dropAllTables

public void dropAllTables(StoreManager.MgmtTransaction mtx)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2001-2007 The TJDO Project All Rights Reserved.