public class OraclePlatform extends DatabasePlatform
Purpose: Provides Oracle specific behavior.
Responsibilities:
DEFAULT_VARCHAR_SIZEDEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, Types_NCLOB, Types_SQLXML| Constructor and Description |
|---|
OraclePlatform() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsSizeInProcedureArguments()
Used for stored procedure definitions.
|
ExpressionOperator |
atan2Operator()
INTERNAL:
Build operator.
|
DatabaseCall |
buildCallWithReturning(SQLCall sqlCall,
java.util.Vector returnFields)
INTERNAL:
Returns null unless the platform supports call with returning
|
ValueReadQuery |
buildSelectQueryForIdentity(java.lang.String qualifiedSeqName,
java.lang.Integer size)
INTERNAL:
Though Oracle doesn't support identity it could be imitated,
see comment to setSupportsIdentity method.
|
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName,
java.lang.Integer size)
INTERNAL:
Produce a DataReadQuery which updates(!) the sequence number in the db
and returns it.
|
boolean |
canBuildCallWithReturning()
INTERNAL:
Indicates whether the platform can build call with returning.
|
boolean |
canUnwrapOracleConnection()
INTERNAL:
Indicates whether this Oracle platform can unwrap Oracle connection.
|
void |
clearOracleConnectionCache(java.sql.Connection conn)
INTERNAL:
Clears both implicit and explicit caches of OracleConnection on Oracle9Platform, noop here.
|
static ExpressionOperator |
exceptOperator()
INTERNAL:
Create the EXCEPT operator, MINUS in Oracle.
|
java.lang.String |
getAssignmentString()
INTERNAL:
Used for stored function calls.
|
java.lang.String |
getBatchBeginString()
Used for batch writing and sp defs.
|
java.lang.String |
getBatchEndString()
Used for batch writing and sp defs.
|
java.lang.String |
getDeclareBeginString()
INTERNAL:
DECLARE stanza header for Anonymous PL/SQL block
|
int |
getMaxFieldNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a field
name on this platform.
|
java.util.Vector |
getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
Return the catalog information through using the native SQL catalog selects.
|
java.lang.Object |
getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
INTERNAL:
Get a timestamp value from a result set.
|
java.lang.String |
getProcedureArgumentSetter()
Used for sp calls.
|
java.lang.String |
getProcedureCallHeader()
Used for sp calls.
|
java.lang.String |
getProcedureCallTail()
Used for sp calls.
|
java.lang.String |
getSelectForUpdateString()
Most database support a syntax.
|
java.lang.String |
getSelectForUpdateWaitString(java.lang.Integer waitTimeout)
Platforms that support the WAIT option should override this method.
|
java.lang.String |
getStoredProcedureParameterPrefix() |
java.lang.String |
getStoredProcedureTerminationToken() |
ValueReadQuery |
getSystemChangeNumberQuery()
PUBLIC:
The query to select the current system change number
from Oracle.
|
ValueReadQuery |
getTimestampQuery()
PUBLIC:
This method returns the query to select the timestamp
from the server for Oracle.
|
DatabaseQuery |
getVPDClearIdentifierQuery(java.lang.String vpdIdentifier)
INTERNAL:
Return an Oracle defined VPD clear identifier query.
|
java.lang.String |
getVPDCreationFunctionString(java.lang.String tableName,
java.lang.String tenantFieldName)
INTERNAL:
Return an Oracle defined VPD identifier function.
|
java.lang.String |
getVPDCreationPolicyString(java.lang.String tableName,
AbstractSession session)
INTERNAL:
Return an Oracle defined VPD identifier policy.
|
java.lang.String |
getVPDDeletionString(java.lang.String tableName,
AbstractSession session)
INTERNAL:
Return an Oracle defined VPD identifier policy deletion.
|
DatabaseQuery |
getVPDSetIdentifierQuery(java.lang.String vpdIdentifier)
INTERNAL:
Return an Oracle defined VPD set identifier query.
|
boolean |
isAlterSequenceObjectSupported()
INTERNAL:
Override this method if the platform supports sequence objects
and it's possible to alter sequence object's increment in the database.
|
boolean |
isForUpdateCompatibleWithDistinct()
INTERNAL:
Indicates whether SELECT DISTINCT ...
|
boolean |
isLockTimeoutException(DatabaseException e)
Return true if the given exception occurred as a result of a lock
time out exception (WAIT clause).
|
boolean |
isNativeConnectionRequiredForLobLocator()
INTERNAL:
Used by derived platforms (Oracle8Platform and higher)
to indicate whether app.
|
boolean |
isOracle() |
java.util.Hashtable |
maximumNumericValues()
Builds a table of maximum numeric values keyed on java class.
|
java.util.Hashtable |
minimumNumericValues()
Builds a table of minimum numeric values keyed on java class.
|
void |
printFieldNullClause(java.io.Writer writer)
INTERNAL:
Append the receiver's field 'NULL' constraint clause to a writer.
|
void |
printSQLSelectStatement(DatabaseCall call,
ExpressionSQLPrinter printer,
SQLSelectStatement statement)
INTERNAL:
Print the SQL representation of the statement on a stream, storing the fields
in the DatabaseCall.
|
static ExpressionOperator |
regexpOperator()
INTERNAL:
Create the REGEXP_LIKE operator.
|
java.lang.String |
serverTimestampString()
Return the current date and time from the server.
|
void |
setSupportsIdentity(boolean supportsIdentity)
ADVANCED:
Oracle db doesn't support identity.
|
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this.
|
boolean |
supportsAutoConversionToNumericForArithmeticOperations()
Some db allow VARCHAR db field to be used in arithmetic operations automatically converting them to numeric:
UPDATE OL_PHONE SET PHONE_ORDER_VARCHAR = (PHONE_ORDER_VARCHAR + 1) WHERE ...
|
boolean |
supportsIdentity()
INTERNAL:
Indicates whether the platform supports identity.
|
boolean |
supportsSelectForUpdateNoWait()
Returns true if the database supports SQL syntax not to wait on a SELECT..FOR UPADTE
(i.e.
|
boolean |
supportsSequenceObjects()
INTERNAL:
Indicates whether the platform supports sequence objects.
|
boolean |
supportsStoredFunctions()
INTERNAL:
Return if database stored functions are supported.
|
boolean |
supportsVPD()
Oracle db supports VPD.
|
java.sql.Connection |
unwrapOracleConnection(java.sql.Connection connection)
INTERNAL:
If can unwrap returns unwrapped Oracle connection, otherwise original connection.
|
boolean |
wasFailureCommunicationBased(java.sql.SQLException exception,
java.sql.Connection connection,
AbstractSession sessionForProfile)
INTERNAL:
A call to this method will perform a platform based check on the connection and exception
error code to determine if the connection is still valid or if a communication error has occurred.
|
addBatch, addStructConverter, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getBatchDelimiterString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, hasPartitioningCallback, initialize, initializeConnectionData, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isNullAllowedInSelectClause, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setCastSizeForVarcharParameter, setCursorCode, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSqladdSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequencepublic boolean allowsSizeInProcedureArguments()
DatabasePlatformallowsSizeInProcedureArguments in class DatabasePlatformpublic ExpressionOperator atan2Operator()
public DatabaseCall buildCallWithReturning(SQLCall sqlCall, java.util.Vector returnFields)
buildCallWithReturning in class DatabasePlatformpublic boolean canBuildCallWithReturning()
canBuildCallWithReturning in class DatabasePlatformpublic void clearOracleConnectionCache(java.sql.Connection conn)
public java.lang.String getAssignmentString()
getAssignmentString in class DatabasePlatformpublic java.lang.String getDeclareBeginString()
public java.lang.String getBatchBeginString()
getBatchBeginString in class DatabasePlatformpublic java.lang.String getBatchEndString()
getBatchEndString in class DatabasePlatformpublic int getMaxFieldNameSize()
getMaxFieldNameSize in class DatabasePlatformpublic java.util.Vector getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
public java.lang.String getProcedureArgumentSetter()
getProcedureArgumentSetter in class DatabasePlatformpublic java.lang.String getProcedureCallHeader()
getProcedureCallHeader in class DatabasePlatformpublic java.lang.String getProcedureCallTail()
getProcedureCallTail in class DatabasePlatformpublic java.lang.String getSelectForUpdateString()
DatabasePlatformgetSelectForUpdateString in class DatabasePlatformpublic java.lang.String getSelectForUpdateWaitString(java.lang.Integer waitTimeout)
DatabasePlatformgetSelectForUpdateWaitString in class DatabasePlatformpublic java.lang.String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix in class DatabasePlatformpublic java.lang.String getStoredProcedureTerminationToken()
getStoredProcedureTerminationToken in class DatabasePlatformpublic ValueReadQuery getSystemChangeNumberQuery()
public ValueReadQuery getTimestampQuery()
getTimestampQuery in interface PlatformgetTimestampQuery in class DatasourcePlatformpublic DatabaseQuery getVPDClearIdentifierQuery(java.lang.String vpdIdentifier)
getVPDClearIdentifierQuery in class DatabasePlatformpublic java.lang.String getVPDCreationFunctionString(java.lang.String tableName,
java.lang.String tenantFieldName)
getVPDCreationFunctionString in class DatabasePlatformpublic java.lang.String getVPDCreationPolicyString(java.lang.String tableName,
AbstractSession session)
getVPDCreationPolicyString in class DatabasePlatformpublic java.lang.String getVPDDeletionString(java.lang.String tableName,
AbstractSession session)
getVPDDeletionString in class DatabasePlatformpublic DatabaseQuery getVPDSetIdentifierQuery(java.lang.String vpdIdentifier)
getVPDSetIdentifierQuery in class DatabasePlatformpublic java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
throws java.sql.SQLException
getObjectFromResultSet in class DatabasePlatformjava.sql.SQLExceptionorg.eclipse.persistence.oraclespecific.Oracle9Platformpublic static ExpressionOperator exceptOperator()
public static ExpressionOperator regexpOperator()
public boolean isNativeConnectionRequiredForLobLocator()
public boolean isOracle()
isOracle in interface PlatformisOracle in class DatasourcePlatformpublic java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues in class DatabasePlatformpublic java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues in class DatabasePlatformpublic ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName, java.lang.Integer size)
buildSelectQueryForSequenceObject in class DatasourcePlatformqualifiedSeqName - known by Oracle to be a defined sequencepublic ValueReadQuery buildSelectQueryForIdentity(java.lang.String qualifiedSeqName, java.lang.Integer size)
buildSelectQueryForIdentity in class DatasourcePlatformqualifiedSeqName - known by Oracle to be a defined sequencepublic void printFieldNullClause(java.io.Writer writer)
throws ValidationException
printFieldNullClause in class DatabasePlatformValidationExceptionpublic java.lang.String serverTimestampString()
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax in class DatabasePlatformpublic boolean supportsAutoConversionToNumericForArithmeticOperations()
supportsAutoConversionToNumericForArithmeticOperations in class DatabasePlatformpublic boolean supportsSequenceObjects()
supportsSequenceObjects in class DatasourcePlatformpublic boolean supportsIdentity()
supportsIdentity in class DatasourcePlatformpublic void setSupportsIdentity(boolean supportsIdentity)
public boolean supportsStoredFunctions()
supportsStoredFunctions in class DatabasePlatformpublic boolean supportsVPD()
supportsVPD in class DatabasePlatformpublic boolean supportsSelectForUpdateNoWait()
public boolean canUnwrapOracleConnection()
public java.sql.Connection unwrapOracleConnection(java.sql.Connection connection)
public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement)
printSQLSelectStatement in class DatabasePlatformpublic boolean isAlterSequenceObjectSupported()
isAlterSequenceObjectSupported in class DatabasePlatformpublic boolean isForUpdateCompatibleWithDistinct()
isForUpdateCompatibleWithDistinct in class DatabasePlatformpublic boolean isLockTimeoutException(DatabaseException e)
isLockTimeoutException in class DatabasePlatformOraclePlatform.public boolean wasFailureCommunicationBased(java.sql.SQLException exception,
java.sql.Connection connection,
AbstractSession sessionForProfile)
wasFailureCommunicationBased in class DatabasePlatformEclipseLink 2.4.2, "build v20130514-5956486" API Reference