|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.schema.RDBMSSchemaHandler
public class RDBMSSchemaHandler
Handler for RDBMS schema information. Provides access to the following types of schema data
| Field Summary | |
|---|---|
protected long |
COLUMN_INFO_EXPIRATION_MS
Time within which column info is valid (millisecs). |
protected static org.datanucleus.util.Localiser |
LOCALISER
Localiser for messages. |
protected Map<String,org.datanucleus.store.schema.StoreSchemaData> |
schemaDataByName
Map of schema data, keyed by its symbolic name where the data is cached. |
protected RDBMSStoreManager |
storeMgr
|
| Constructor Summary | |
|---|---|
RDBMSSchemaHandler(RDBMSStoreManager storeMgr)
|
|
| Method Summary | |
|---|---|
void |
clear()
Method to clear out any cached schema information. |
void |
createSchema(Object connection,
String schemaName)
Method to create the schema with the supplied name. |
void |
deleteSchema(Object connection,
String schemaName)
Method to delete the schema with the supplied name. |
protected RDBMSColumnInfo |
getRDBMSColumnInfoForColumn(Connection conn,
Table table,
String columnName)
Convenience method to get the column info from the datastore for the column in the specified table. |
protected RDBMSSchemaInfo |
getRDBMSSchemaInfoForCatalogSchema(Connection conn,
String catalog,
String schema)
Convenience method to retrieve schema information for all tables in the specified catalog/schema. |
protected RDBMSTableFKInfo |
getRDBMSTableFKInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
Convenience method to get the ForeignKey info for the specified table from the datastore. |
protected RDBMSTableFKInfo |
getRDBMSTableFKInfoForTable(Connection conn,
Table table)
Convenience method to get the ForeignKey info for the specified table from the datastore. |
protected RDBMSTableIndexInfo |
getRDBMSTableIndexInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
Convenience method to get the index info for the catalog+schema+tableName in the datastore. |
protected RDBMSTableIndexInfo |
getRDBMSTableIndexInfoForTable(Connection conn,
Table table)
Convenience method to get the index info for the specified table from the datastore. |
protected RDBMSTableInfo |
getRDBMSTableInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
Convenience method to get the column info for the catalog+schema+tableName in the datastore. |
protected RDBMSTableInfo |
getRDBMSTableInfoForTable(Connection conn,
Table table)
Convenience method to get the column info for the specified table from the datastore. |
protected RDBMSTablePKInfo |
getRDBMSTablePKInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
Convenience method to get the PrimaryKey info for the specified table from the datastore. |
protected RDBMSTablePKInfo |
getRDBMSTablePKInfoForTable(Connection conn,
Table table)
Convenience method to get the PrimaryKey info for the specified table from the datastore. |
protected RDBMSTypesInfo |
getRDBMSTypesInfo(Connection conn)
Convenience method to read and cache the types information for this datastore. |
org.datanucleus.store.schema.StoreSchemaData |
getSchemaData(Object connection,
String name,
Object[] values)
Accessor for schema data store under the provided name and defined by the specified values. |
org.datanucleus.store.StoreManager |
getStoreManager()
Accessor for the StoreManager we handle the schema for. |
String |
getTableType(Connection conn,
Table table)
Returns the type of a database table/view in the datastore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
protected final long COLUMN_INFO_EXPIRATION_MS
protected final RDBMSStoreManager storeMgr
protected Map<String,org.datanucleus.store.schema.StoreSchemaData> schemaDataByName
| Constructor Detail |
|---|
public RDBMSSchemaHandler(RDBMSStoreManager storeMgr)
| Method Detail |
|---|
public void clear()
clear in interface org.datanucleus.store.schema.StoreSchemaHandler
public void createSchema(Object connection,
String schemaName)
createSchema in interface org.datanucleus.store.schema.StoreSchemaHandlerconnection - Connection to the datastoreschemaName - Name of the schema
public void deleteSchema(Object connection,
String schemaName)
deleteSchema in interface org.datanucleus.store.schema.StoreSchemaHandlerconnection - Connection to the datastoreschemaName - Name of the schema
public org.datanucleus.store.schema.StoreSchemaData getSchemaData(Object connection,
String name,
Object[] values)
getSchemaData in interface org.datanucleus.store.schema.StoreSchemaHandlerconnection - Connection to the datastorename - Name of the schema component to return.values - Value(s) to use as qualifier(s) for selecting the schema component
public org.datanucleus.store.StoreManager getStoreManager()
getStoreManager in interface org.datanucleus.store.schema.StoreSchemaHandler
public String getTableType(Connection conn,
Table table)
throws SQLException
conn - Connection to the database.table - The table/view
org.datanucleus.exceptions.NucleusDataStoreException - if an error occurs obtaining the information
SQLExceptionprotected RDBMSTypesInfo getRDBMSTypesInfo(Connection conn)
conn - Connection to the datastore
protected RDBMSTableFKInfo getRDBMSTableFKInfoForTable(Connection conn,
Table table)
conn - Connection to usetable - The table
protected RDBMSTableFKInfo getRDBMSTableFKInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
conn - Connection to usecatalogName - CatalogschemaName - SchematableName - Name of the table
protected RDBMSTablePKInfo getRDBMSTablePKInfoForTable(Connection conn,
Table table)
conn - Connection to usetable - The table
protected RDBMSTablePKInfo getRDBMSTablePKInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
conn - Connection to usecatalogName - CatalogschemaName - SchematableName - Name of the table
protected RDBMSTableIndexInfo getRDBMSTableIndexInfoForTable(Connection conn,
Table table)
conn - Connection to usetable - The table
protected RDBMSTableIndexInfo getRDBMSTableIndexInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
conn - Connection to usecatalogName - CatalogschemaName - SchematableName - Name of the table
protected RDBMSSchemaInfo getRDBMSSchemaInfoForCatalogSchema(Connection conn,
String catalog,
String schema)
conn - Connectioncatalog - Catalogschema - Schema
protected RDBMSTableInfo getRDBMSTableInfoForTable(Connection conn,
Table table)
conn - Connection to usetable - The table
protected RDBMSTableInfo getRDBMSTableInfoForTable(Connection conn,
String catalogName,
String schemaName,
String tableName)
conn - Connection to usecatalogName - CatalogschemaName - SchematableName - Name of the table
protected RDBMSColumnInfo getRDBMSColumnInfoForColumn(Connection conn,
Table table,
String columnName)
conn - Connection to usetable - The tablecolumnName - Name of the column
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||