org.datanucleus.store.rdbms.table
Class ProbeTable

java.lang.Object
  extended by org.datanucleus.store.rdbms.table.AbstractTable
      extended by org.datanucleus.store.rdbms.table.TableImpl
          extended by org.datanucleus.store.rdbms.table.ProbeTable
All Implemented Interfaces:
org.datanucleus.store.mapped.DatastoreContainerObject, Table

public class ProbeTable
extends TableImpl

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


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.table.AbstractTable
columns, columnsByName, dba, existsInDatastore, identifier, LOCALISER, state, storeMgr
 
Constructor Summary
ProbeTable(RDBMSManager storeMgr)
          Constructor
 
Method Summary
protected  boolean allowDDLOutput()
          Override to always really create ProbeTables in the DB.
 java.lang.String[] findSchemaDetails(java.sql.Connection conn)
          Accessor for the Schema details.
 org.datanucleus.store.mapped.mapping.JavaTypeMapping getIDMapping()
          Accessor for a mapping for the ID (PersistenceCapable) for this table.
 org.datanucleus.store.mapped.mapping.JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
          Accessor the for the mapping for a field/property stored in this table.
 void initialize(org.datanucleus.ClassLoaderResolver clr)
          Method to initialise the table.
 
Methods inherited from class org.datanucleus.store.rdbms.table.TableImpl
createConstraints, dropConstraints, getExpectedCandidateKeys, getExpectedForeignKeys, getExpectedIndices, getPrimaryKey, getSQLAddCandidateKeyStatements, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, initializeColumnInfoForPrimaryKeyColumns, initializeColumnInfoFromDatastore, postInitialize, preInitialize, validate, validateColumns, validateConstraints, validatePrimaryKey
 
Methods inherited from class org.datanucleus.store.rdbms.table.AbstractTable
addColumnInternal, addDatastoreField, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getDatastoreField, getDatastoreFields, getDatastoreIdentifierFullyQualified, getDiscriminatorMapping, getDiscriminatorMetaData, getIdentifier, getSchemaName, getStoreManager, getVersionMapping, getVersionMetaData, hasColumnName, hasDatastoreField, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, tableExistsInDatastore, 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(org.datanucleus.ClassLoaderResolver clr)
Method to initialise the table.

Parameters:
clr - The ClassLoaderResolver

getIDMapping

public org.datanucleus.store.mapped.mapping.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.

allowDDLOutput

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

Overrides:
allowDDLOutput in class AbstractTable
Returns:
Whether it allows DDL outputting
See Also:
AbstractTable.allowDDLOutput()

getMemberMapping

public org.datanucleus.store.mapped.mapping.JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor the for the mapping for a field/property stored in this table.

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


Copyright © 2009. All Rights Reserved.