|
||||||||||
| 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 java.lang.String |
OJDBC_DRIVER_NAME
What the official Oracle JDBC driver uses to identify itself. |
static java.lang.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 java.lang.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 java.lang.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(java.sql.DatabaseMetaData metadata)
Constructs an Oracle adapter based on the given JDBC metadata. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCatalogName(java.sql.Connection conn)
Accessor for the Catalog Name for this datastore. |
java.sql.ResultSet |
getColumns(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String columnNamePattern)
Accessor for table and column information for a catalog/schema in this datastore. |
java.lang.String |
getDatastoreDateStatement()
Accessor for a statement that will return the statement to use to get the datastore date. |
java.lang.String |
getDropTableStatement(org.datanucleus.store.mapped.DatastoreContainerObject table)
Method to return the drop table statement for Oracle. |
java.sql.ResultSet |
getExistingIndexes(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.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. |
java.lang.String |
getOrderString(org.datanucleus.store.StoreManager storeMgr,
java.lang.String orderString,
SQLExpression sqlExpr)
Convenience method to allow adaption of an ordering string before applying it. |
java.lang.String |
getRangeByRowNumberColumn2()
Method to return the column name to use when handling ranges via a rownumber on the select using the second method (Oracle). |
java.lang.String |
getSchemaName(java.sql.Connection conn)
Accessor for the Schema Name for this datastore. |
java.lang.String |
getSequenceCreateStmt(java.lang.String sequence_name,
java.lang.Integer min,
java.lang.Integer max,
java.lang.Integer start,
java.lang.Integer increment,
java.lang.Integer cache_size)
Accessor for the sequence statement to create the sequence. |
java.lang.String |
getSequenceNextStmt(java.lang.String sequence_name)
Accessor for the statement for getting the next id from the sequence for this datastore. |
java.lang.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. |
java.lang.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(java.sql.SQLException sqle)
return whether this exception represents a timed out statement. |
RDBMSColumnInfo |
newRDBMSColumnInfo(java.sql.ResultSet rs)
Method to create a column info for the current row. |
SQLTypeInfo |
newSQLTypeInfo(java.sql.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 java.lang.String OJDBC_DRIVER_NAME
public static final java.lang.String ORACLE_8_RESERVED_WORDS
public static final java.lang.String ORACLE_9_RESERVED_WORDS
public static final java.lang.String ORACLE_10_RESERVED_WORDS
| Constructor Detail |
|---|
public OracleAdapter(java.sql.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(java.sql.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 java.lang.String getVendorID()
getVendorID in interface org.datanucleus.store.mapped.DatastoreAdaptergetVendorID in class DatabaseAdapterpublic java.lang.String getSurrogateForEmptyStrings()
getSurrogateForEmptyStrings in interface RDBMSAdaptergetSurrogateForEmptyStrings in class DatabaseAdapter
public java.lang.String getCatalogName(java.sql.Connection conn)
throws java.sql.SQLException
DatabaseAdapter
getCatalogName in interface RDBMSAdaptergetCatalogName in class DatabaseAdapterconn - Connection to the datastore
java.sql.SQLException - Thrown if error occurs in determining the catalog name.
public java.lang.String getSchemaName(java.sql.Connection conn)
throws java.sql.SQLException
DatabaseAdapter
getSchemaName in interface RDBMSAdaptergetSchemaName in class DatabaseAdapterconn - Connection to the datastore
java.sql.SQLException - Thrown if error occurs in determining the schema name.
public java.sql.ResultSet getExistingIndexes(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
getExistingIndexes in interface RDBMSAdaptergetExistingIndexes in class DatabaseAdapterconn - the JDBC connectioncatalog - the catalog nameschema - the schema name.table - the table name
java.sql.SQLExceptionpublic java.lang.String getDropTableStatement(org.datanucleus.store.mapped.DatastoreContainerObject table)
getDropTableStatement in interface RDBMSAdaptergetDropTableStatement in class DatabaseAdaptertable - The table
public java.lang.String getSequenceCreateStmt(java.lang.String sequence_name,
java.lang.Integer min,
java.lang.Integer max,
java.lang.Integer start,
java.lang.Integer increment,
java.lang.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 java.lang.String getSequenceNextStmt(java.lang.String sequence_name)
getSequenceNextStmt in interface RDBMSAdaptergetSequenceNextStmt in class DatabaseAdaptersequence_name - Name of the sequence
public RDBMSColumnInfo newRDBMSColumnInfo(java.sql.ResultSet rs)
newRDBMSColumnInfo in interface RDBMSAdapternewRDBMSColumnInfo in class DatabaseAdapterrs - ResultSet from DatabaseMetaData.getColumns()
public int getTransactionIsolationForSchemaCreation()
getTransactionIsolationForSchemaCreation in interface RDBMSAdaptergetTransactionIsolationForSchemaCreation in class DatabaseAdapter
public java.sql.ResultSet getColumns(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String columnNamePattern)
throws java.sql.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
java.sql.SQLException - Thrown if an error occurspublic java.lang.String getDatastoreDateStatement()
getDatastoreDateStatement in interface RDBMSAdaptergetDatastoreDateStatement in class DatabaseAdapter
public java.lang.String getOrderString(org.datanucleus.store.StoreManager storeMgr,
java.lang.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(java.sql.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 java.lang.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 | |||||||||