|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.adapter.DatabaseAdapter
org.datanucleus.store.rdbms.adapter.OracleAdapter
public class OracleAdapter
Provides methods for adapting SQL language elements to the Oracle database.
DatabaseAdapter| Field Summary | |
|---|---|
static String |
OJDBC_DRIVER_NAME
What the official Oracle JDBC driver uses to identify itself. |
static String |
ORACLE_10_RESERVED_WORDS
A string containing the list of Oracle keywords This list is normally obtained dynamically from the driver using DatabaseMetaData.getSQLKeywords() Based on database Oracle10g |
static String |
ORACLE_8_RESERVED_WORDS
A string containing the list of Oracle keywords This list is normally obtained dynamically from the driver using DatabaseMetaData.getSQLKeywords() Based on database Oracle8 |
static String |
ORACLE_9_RESERVED_WORDS
A string containing the list of Oracle keywords This list is normally obtained dynamically from the driver using DatabaseMetaData.getSQLKeywords() Based on database Oracle9i |
| Fields inherited from class org.datanucleus.store.rdbms.adapter.DatabaseAdapter |
|---|
catalogSeparator, datastoreMajorVersion, datastoreMinorVersion, datastoreProductName, datastoreProductVersion, datastoreRevisionVersion, driverMajorVersion, driverMinorVersion, driverName, driverVersion, identifierQuoteString, LOCALISER, LOCALISER_BASE, maxColumnNameLength, maxConstraintNameLength, maxIndexNameLength, maxTableNameLength, properties, reservedKeywords, supportedOptions |
| Fields inherited from interface org.datanucleus.store.mapped.DatastoreAdapter |
|---|
ANALYSIS_METHODS, BIT_IS_REALLY_BOOLEAN, BOOLEAN_COMPARISON, CATALOGS_IN_TABLE_DEFINITIONS, ESCAPE_EXPRESSION_IN_LIKE_PREDICATE, IDENTIFIERS_LOWERCASE, IDENTIFIERS_LOWERCASE_QUOTED, IDENTIFIERS_MIXEDCASE, IDENTIFIERS_MIXEDCASE_QUOTED, IDENTIFIERS_MIXEDCASE_QUOTED_SENSITIVE, IDENTIFIERS_MIXEDCASE_SENSITIVE, IDENTIFIERS_UPPERCASE, IDENTIFIERS_UPPERCASE_QUOTED, IDENTITY_COLUMNS, PROJECTION_IN_TABLE_REFERENCE_JOINS, SCHEMAS_IN_TABLE_DEFINITIONS, SEQUENCES |
| Constructor Summary | |
|---|---|
OracleAdapter(DatabaseMetaData metadata)
Constructs an Oracle adapter based on the given JDBC metadata. |
|
| Method Summary | |
|---|---|
String |
getCatalogName(Connection conn)
Accessor for the Catalog Name for this datastore. |
ResultSet |
getColumns(Connection conn,
String catalog,
String schema,
String table,
String columnNamePattern)
Accessor for table and column information for a catalog/schema in this datastore. |
String |
getDatastoreDateStatement()
Accessor for a statement that will return the statement to use to get the datastore date. |
String |
getDropTableStatement(org.datanucleus.store.mapped.DatastoreContainerObject table)
Method to return the drop table statement for Oracle. |
ResultSet |
getExistingIndexes(Connection conn,
String catalog,
String schema,
String table)
Provide the existing indexes in the database for the table. |
org.datanucleus.store.mapped.mapping.MappingManager |
getMappingManager(org.datanucleus.store.mapped.MappedStoreManager storeMgr)
Accessor for a MappingManager suitable for use with this datastore adapter. |
String |
getOrderString(org.datanucleus.store.StoreManager storeMgr,
String orderString,
SQLExpression sqlExpr)
Convenience method to allow adaption of an ordering string before applying it. |
String |
getRangeByRowNumberColumn2()
Method to return the column name to use when handling ranges via a rownumber on the select using the second method (Oracle). |
String |
getSchemaName(Connection conn)
Accessor for the Schema Name for this datastore. |
String |
getSequenceCreateStmt(String sequence_name,
Integer min,
Integer max,
Integer start,
Integer increment,
Integer cache_size)
Accessor for the sequence statement to create the sequence. |
String |
getSequenceNextStmt(String sequence_name)
Accessor for the statement for getting the next id from the sequence for this datastore. |
String |
getSurrogateForEmptyStrings()
Some databases, Oracle, treats an empty string (0 length) equals null |
int |
getTransactionIsolationForSchemaCreation()
Accessor for the transaction isolation level to use during schema creation. |
String |
getVendorID()
Accessor for the vendor id |
void |
initialiseTypes(org.datanucleus.store.schema.StoreSchemaHandler handler,
org.datanucleus.store.connection.ManagedConnection mconn)
Initialise the types for this datastore. |
boolean |
isStatementTimeout(SQLException sqle)
return whether this exception represents a timed out statement. |
RDBMSColumnInfo |
newRDBMSColumnInfo(ResultSet rs)
Method to create a column info for the current row. |
SQLTypeInfo |
newSQLTypeInfo(ResultSet rs)
Create a new SQL type info from the current row of the passed ResultSet. |
boolean |
validToSelectMappingInStatement(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping m)
Method to return if it is valid to select the specified mapping for the specified statement for this datastore adapter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String OJDBC_DRIVER_NAME
public static final String ORACLE_8_RESERVED_WORDS
public static final String ORACLE_9_RESERVED_WORDS
public static final String ORACLE_10_RESERVED_WORDS
| Constructor Detail |
|---|
public OracleAdapter(DatabaseMetaData metadata)
metadata - the database metadata.| Method Detail |
|---|
public void initialiseTypes(org.datanucleus.store.schema.StoreSchemaHandler handler,
org.datanucleus.store.connection.ManagedConnection mconn)
initialiseTypes in interface org.datanucleus.store.mapped.DatastoreAdapterinitialiseTypes in class DatabaseAdapterhandler - SchemaHandler that we initialise the types formconn - Managed connection to usepublic SQLTypeInfo newSQLTypeInfo(ResultSet rs)
RDBMSAdapter
newSQLTypeInfo in interface RDBMSAdapternewSQLTypeInfo in class DatabaseAdapterrs - ResultSet
public org.datanucleus.store.mapped.mapping.MappingManager getMappingManager(org.datanucleus.store.mapped.MappedStoreManager storeMgr)
getMappingManager in interface org.datanucleus.store.mapped.DatastoreAdaptergetMappingManager in class DatabaseAdapterstoreMgr - The StoreManager
public String getVendorID()
getVendorID in interface org.datanucleus.store.mapped.DatastoreAdaptergetVendorID in class DatabaseAdapterpublic String getSurrogateForEmptyStrings()
getSurrogateForEmptyStrings in interface RDBMSAdaptergetSurrogateForEmptyStrings in class DatabaseAdapter
public String getCatalogName(Connection conn)
throws SQLException
DatabaseAdapter
getCatalogName in interface RDBMSAdaptergetCatalogName in class DatabaseAdapterconn - Connection to the datastore
SQLException - Thrown if error occurs in determining the catalog name.
public String getSchemaName(Connection conn)
throws SQLException
DatabaseAdapter
getSchemaName in interface RDBMSAdaptergetSchemaName in class DatabaseAdapterconn - Connection to the datastore
SQLException - Thrown if error occurs in determining the schema name.
public ResultSet getExistingIndexes(Connection conn,
String catalog,
String schema,
String table)
throws SQLException
getExistingIndexes in interface RDBMSAdaptergetExistingIndexes in class DatabaseAdapterconn - the JDBC connectioncatalog - the catalog nameschema - the schema name.table - the table name
SQLExceptionpublic String getDropTableStatement(org.datanucleus.store.mapped.DatastoreContainerObject table)
getDropTableStatement in interface RDBMSAdaptergetDropTableStatement in class DatabaseAdaptertable - The table
public String getSequenceCreateStmt(String sequence_name,
Integer min,
Integer max,
Integer start,
Integer increment,
Integer cache_size)
getSequenceCreateStmt in interface RDBMSAdaptergetSequenceCreateStmt in class DatabaseAdaptersequence_name - Name of the sequencemin - Minimum value for the sequencemax - Maximum value for the sequencestart - Start value for the sequenceincrement - Increment value for the sequencecache_size - Cache size for the sequence
public String getSequenceNextStmt(String sequence_name)
getSequenceNextStmt in interface RDBMSAdaptergetSequenceNextStmt in class DatabaseAdaptersequence_name - Name of the sequence
public RDBMSColumnInfo newRDBMSColumnInfo(ResultSet rs)
newRDBMSColumnInfo in interface RDBMSAdapternewRDBMSColumnInfo in class DatabaseAdapterrs - ResultSet from DatabaseMetaData.getColumns()
public int getTransactionIsolationForSchemaCreation()
getTransactionIsolationForSchemaCreation in interface RDBMSAdaptergetTransactionIsolationForSchemaCreation in class DatabaseAdapter
public ResultSet getColumns(Connection conn,
String catalog,
String schema,
String table,
String columnNamePattern)
throws SQLException
getColumns in interface RDBMSAdaptergetColumns in class DatabaseAdapterconn - Connection to usecatalog - The catalog (null if none)schema - The schema (null if none)table - The table (null if all)columnNamePattern - Col name(s) (null if all) NOT USED
SQLException - Thrown if an error occurspublic String getDatastoreDateStatement()
getDatastoreDateStatement in interface RDBMSAdaptergetDatastoreDateStatement in class DatabaseAdapter
public String getOrderString(org.datanucleus.store.StoreManager storeMgr,
String orderString,
SQLExpression sqlExpr)
getOrderString in interface RDBMSAdaptergetOrderString in class DatabaseAdapterstoreMgr - StoreManagerorderString - The basic ordering stringsqlExpr - The sql expression being represented here
public boolean isStatementTimeout(SQLException sqle)
DatabaseAdapter
isStatementTimeout in interface RDBMSAdapterisStatementTimeout in class DatabaseAdaptersqle - the exception
public boolean validToSelectMappingInStatement(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping m)
validToSelectMappingInStatement in interface RDBMSAdaptervalidToSelectMappingInStatement in class DatabaseAdapterstmt - The statementm - The mapping that we want to select
public String getRangeByRowNumberColumn2()
DatabaseAdapter
getRangeByRowNumberColumn2 in interface RDBMSAdaptergetRangeByRowNumberColumn2 in class DatabaseAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||