Class Oracle8Adapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.oracle.OracleAdapter
org.apache.cayenne.dba.oracle.Oracle8Adapter
- All Implemented Interfaces:
DbAdapter
A flavor of OracleAdapter that implements workarounds for some old driver
limitations.
- Since:
- 1.2
-
Field Summary
Fields inherited from class OracleAdapter
initDone, NEW_BLOB_FUNCTION, NEW_CLOB_FUNCTION, ORACLE_BLOB, ORACLE_CLOB, ORACLE_FLOAT, ORACLE_NCLOB, oracleCursorType, supportsOracleLOB, TRIM_FUNCTIONFields inherited from class JdbcAdapter
caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandlerModifier and TypeFieldDescriptionprotected booleanprotected EJBQLTranslatorFactoryprotected ExtendedTypeMapprotected JdbcEventLoggerprotected QuotingStrategyprotected ResourceLocatorprotected booleanprotected booleanprotected booleanprotected TypesHandler -
Constructor Summary
ConstructorsConstructorDescriptionOracle8Adapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected URLfindResource(String name) Locates and returns a named adapter resource.Uses OracleActionBuilder to create the right action.booleantypeSupportsScale(int type) Returns true if supplied type can have a scale attribute as a part of column definition.Methods inherited from class OracleAdapter
bindParameter, buildAttribute, configureExtendedTypes, createEJBQLTranslatorFactory, dropTableStatements, getOracleCursorType, getSqlTreeProcessor, getSystemSchemas, initDriverInformation, isSupportsOracleLOBModifier and TypeMethodDescriptionvoidbindParameter(PreparedStatement statement, ParameterBinding binding) Binds an object value to PreparedStatement's parameter.buildAttribute(String name, String typeName, int type, int size, int scale, boolean allowNulls) Fixes some reverse engineering problems.protected voidInstalls appropriate ExtendedTypes as converters for passing values between JDBC and Java layers.protected EJBQLTranslatorFactoryCreates and returns anEJBQLTranslatorFactoryused to generate visitors for EJBQL to SQL translations.dropTableStatements(DbEntity table) Returns a query string to drop a table corresponding toentDbEntity.static intReturns an Oracle JDBC extension type defined in oracle.jdbc.driver.OracleTypes.CURSOR.protected static voidstatic booleanMethods inherited from class JdbcAdapter
createFkConstraint, createQuotingStrategy, createTable, createTableAppendColumn, createTableAppendPKClause, createUniqueConstraint, externalTypesForJdbcType, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getSystemCatalogs, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, unwrapModifier and TypeMethodDescriptionReturns a SQL string that can be used to create a foreign key constraint for the relationship.protected QuotingStrategycreateTable(DbEntity entity) Returns a SQL string that can be used to create database table corresponding toentparameter.voidcreateTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) Appends SQL for column creation to CREATE TABLE buffer.protected voidcreateTableAppendPKClause(StringBuffer sqlBuffer, DbEntity entity) createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns) Returns a DDL string to create a unique constraint over a set of columns.String[]externalTypesForJdbcType(int type) Returns an array of RDBMS types that can be used with JDBCtype.Returns default separator - a semicolon.Returns a translator factory for EJBQL to SQL translation.Returns a map of ExtendedTypes that is used to translate values between Java and JDBC layer.Returns primary key generator associated with this DbAdapter.Returns SQL identifier quoting strategy objectgetSelectTranslator(FluentSelect<?, ?> query, EntityResolver entityResolver) static StringgetType(DbAdapter adapter, DbAttribute column) protected voidinitExtendedTypes(List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry) voidsetEjbqlTranslatorFactory(EJBQLTranslatorFactory ejbqlTranslatorFactory) Sets a translator factory for EJBQL to SQL translation.voidsetPkGenerator(PkGenerator pkGenerator) Sets new primary key generator.voidsetSupportsBatchUpdates(boolean flag) voidsetSupportsGeneratedKeys(boolean flag) voidsetSupportsUniqueConstraints(boolean flag) static StringsizeAndPrecision(DbAdapter adapter, DbAttribute column) booleanReturnstrueif the target database supports batch updates.booleanReturns true.booleanReturns true if a target database supports key autogeneration.booleanReturns true.Returns the name of the table type (as returned byDatabaseMetaData.getTableTypes) for a simple user table.Returns the name of the table type (as returned byDatabaseMetaData.getTableTypes) for a view table.booleantypeSupportsLength(int type) Returns true if supplied type can have a length attribute as a part of column definitionunwrap()Simply returns this, as JdbcAdapter is not a wrapper.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DbAdapter
supportsGeneratedKeysForBatchInsertsModifier and TypeMethodDescriptiondefault booleanReturns true if a target database supports key autogeneration in a batch insert.
-
Constructor Details
-
Oracle8Adapter
public Oracle8Adapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
getAction
-
findResource
Description copied from class:JdbcAdapterLocates and returns a named adapter resource. A resource can be an XML file, etc.This implementation is based on the premise that each adapter is located in its own Java package and all resources are in the same package as well. Resource lookup is recursive, so that if DbAdapter is a subclass of another adapter, parent adapter package is searched as a failover.
- Overrides:
findResourcein classJdbcAdapter
-
typeSupportsScale
public boolean typeSupportsScale(int type) Description copied from class:JdbcAdapterReturns true if supplied type can have a scale attribute as a part of column definition.- Specified by:
typeSupportsScalein interfaceDbAdapter- Overrides:
typeSupportsScalein classOracleAdapter- Parameters:
type- sql type code- Returns:
trueif a given type supports scale- Since:
- 5.0
-