org.jpox.store.rdbms.table
Class ProbeTable

java.lang.Object
  extended byorg.jpox.store.rdbms.table.AbstractTable
      extended byorg.jpox.store.rdbms.table.TableImpl
          extended byorg.jpox.store.rdbms.table.ProbeTable
All Implemented Interfaces:
DatastoreContainerObject, DatastoreObject, Table

public class ProbeTable
extends TableImpl

Utility class used for detecting database schema existence and provides means of determining the schema name.

Version:
$Revision: 1.22 $

Field Summary
 
Fields inherited from class org.jpox.store.rdbms.table.AbstractTable
columns, columnsByName, dba, ddlDumpWriter, identifier, LOCALISER, state, storeMgr
 
Fields inherited from interface org.jpox.store.rdbms.table.Table
TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED, TABLE_TYPE_MISSING, TABLE_TYPE_TABLE, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW
 
Constructor Summary
ProbeTable(RDBMSManager storeMgr)
          Constructor
 
Method Summary
protected  boolean allowDdlDump()
          Override to always really create ProbeTables in the DB.
 java.lang.String[] findSchemaDetails(java.sql.Connection conn)
          Accessor for the Schema details.
 JavaTypeMapping getFieldMapping(AbstractPropertyMetaData fmd)
          Accessor the for the mapping for a field store in this table
 JavaTypeMapping getIDMapping()
          Accessor for a mapping for the ID (PersistenceCapable) for this table.
 void initialize(ClassLoaderResolver clr)
          Method to initialise the table.
 
Methods inherited from class org.jpox.store.rdbms.table.TableImpl
dropConstraints, getExpectedCandidateKeys, getExpectedForeignKeys, getExpectedIndices, getPrimaryKey, getSQLAddCandidateKeyStatements, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, initializeColumnInfoForPrimaryKeyColumns, initializeColumnInfoFromDatastore, postInitialize, preInitialize, validate, validateColumns, validateConstraints, validatePrimaryKey
 
Methods inherited from class org.jpox.store.rdbms.table.AbstractTable
addColumnInternal, addDatastoreField, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getDatastoreIdentifierFullyQualified, getDiscriminatorMapping, getDiscriminatorMetaData, getIdentifier, getSchemaName, getStoreManager, getVersionMapping, getVersionMetaData, hasColumnName, hasDatastoreField, hashCode, isDumpingDdl, isInitialized, isInitializedModified, isPKInitialized, isValidated, setDdlDumpWriter, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProbeTable

public ProbeTable(RDBMSManager storeMgr)
Constructor

Parameters:
storeMgr - The RDBMSManager for this datastore
Method Detail

initialize

public void initialize(ClassLoaderResolver clr)
Method to initialise the table.

Parameters:
clr - The ClassLoaderResolver

getIDMapping

public JavaTypeMapping getIDMapping()
Accessor for a mapping for the ID (PersistenceCapable) for this table.

Returns:
The (PersistenceCapable) ID mapping.

findSchemaDetails

public java.lang.String[] findSchemaDetails(java.sql.Connection conn)
                                     throws java.sql.SQLException
Accessor for the Schema details. This will return a String array with 2 elements. The first is the Catalog name, and the second the Schema name.

Parameters:
conn - Connection for this datastore.
Returns:
The Schema details
Throws:
java.sql.SQLException - Thrown when an error occurs in the process.

allowDdlDump

protected boolean allowDdlDump()
Override to always really create ProbeTables in the DB. Needed to determine schema name.

Overrides:
allowDdlDump in class AbstractTable
Returns:
Whether it allows DDL dumping
See Also:
AbstractTable.allowDdlDump()

getFieldMapping

public JavaTypeMapping getFieldMapping(AbstractPropertyMetaData fmd)
Accessor the for the mapping for a field store in this table

Parameters:
fmd - MetaData for the field whose mapping we want
Returns:
The mapping


Copyright © -2007 . All Rights Reserved.