|
EclipseLink1.0 - 20080707 API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform org.eclipse.persistence.internal.databaseaccess.DatabasePlatform org.eclipse.persistence.platform.database.DatabasePlatform org.eclipse.persistence.platform.database.oracle.OraclePlatform
public class OraclePlatform
Purpose: Provides Oracle specific behavior.
Responsibilities:
Field Summary | |
---|---|
protected boolean |
supportsIdentity
Advanced attribute indicating whether identity is supported, see comment to setSupportsIdentity method. |
protected boolean |
useRownumFiltering
Oracle's Rownum can be used to limit results and for pagination, using the query's maxRows and FirstResult settings |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, fieldTypes, maxBatchWritingSize, pingSQL, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, transactionIsolation, typeConverters, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, platformOperators, sequences, tableQualifier, timestampQuery |
Constructor Summary | |
---|---|
OraclePlatform()
|
Method Summary | |
---|---|
boolean |
allowsSizeInProcedureArguments()
|
protected void |
appendByteArray(byte[] bytes,
java.io.Writer writer)
INTERNAL: If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as provided in DatabasePlatform. |
protected void |
appendCalendar(java.util.Calendar calendar,
java.io.Writer writer)
INTERNAL: Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. |
protected void |
appendDate(java.sql.Date date,
java.io.Writer writer)
INTERNAL: Appends an Oracle specific date if usesNativeSQL is true otherwise use the ODBC format. |
protected void |
appendTime(java.sql.Time time,
java.io.Writer writer)
INTERNAL: Appends an Oracle specific time if usesNativeSQL is true otherwise use the ODBC format. |
protected void |
appendTimestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL: Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. |
ExpressionOperator |
atan2Operator()
INTERNAL: Build operator. |
org.eclipse.persistence.internal.databaseaccess.DatabaseCall |
buildCallWithReturning(SQLCall sqlCall,
java.util.Vector returnFields)
INTERNAL: Returns null unless the platform supports call with returning |
protected java.util.Hashtable |
buildFieldTypes()
INTERNAL: |
ValueReadQuery |
buildSelectQueryForIdentity(java.lang.String seqName,
java.lang.Integer size)
INTERNAL: Though Oracle doesn't support identity it could be immitated, see comment to setSupportsIdentity method. |
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String seqName,
java.lang.Integer size)
INTERNAL: Produce a DataReadQuery which updates(!) |
java.io.Writer |
buildSequenceObjectAlterIncrementWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment)
INTERNAL: Override this method if the platform supports sequence objects and isAlterSequenceObjectSupported returns true. |
java.io.Writer |
buildSequenceObjectCreationWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment,
int start)
INTERNAL: Override this method if the platform supports sequence objects. |
java.io.Writer |
buildSequenceObjectDeletionWriter(java.io.Writer writer,
java.lang.String fullSeqName)
INTERNAL: Override this method if the platform supports sequence objects. |
boolean |
canBuildCallWithReturning()
INTERNAL: Indicates whether the platform can build call with returning. |
boolean |
canUnwrapOracleConnection()
INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection. |
protected ExpressionOperator |
currentDateOperator()
|
protected ExpressionOperator |
currentTimeOperator()
|
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,
org.eclipse.persistence.internal.sessions.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,
org.eclipse.persistence.internal.sessions.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()
|
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. |
protected void |
initializePlatformOperators()
Initialize any platform-specific operators |
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 |
isOracle()
|
protected ExpressionOperator |
logOperator()
Create the log operator for this platform |
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. |
protected ExpressionOperator |
operatorLocate()
INTERNAL: Override the default locate operator |
protected ExpressionOperator |
operatorLocate2()
INTERNAL: Override the default locate operator |
protected ExpressionOperator |
operatorOuterJoin()
Create the outer join operator for this platform |
void |
printFieldNullClause(java.io.Writer writer)
INTERNAL: Append the receiver's field 'NULL' constraint clause to a writer. |
void |
printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall. |
java.lang.String |
serverTimestampString()
Return the current date and time from the server. |
void |
setShouldUseRownumFiltering(boolean useRownumFiltering)
PUBLIC: Set if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings. |
void |
setSupportsIdentity(boolean supportsIdentity)
ADVANCED: Oracle db doesn't support identity. |
boolean |
shouldPrintOuterJoinInWhereClause()
Some database require outer joins to be given in the where clause, others require it in the from clause. |
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this. |
boolean |
shouldUseRownumFiltering()
PUBLIC: Return if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings. |
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. |
protected ExpressionOperator |
todayOperator()
Create the sysdate operator for this platform |
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,
org.eclipse.persistence.internal.sessions.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. |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
addBatch, addStructConverter, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildClassTypes, buildProcedureCallString, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, getBatchDelimiterString, getClassTypes, getConnection, getConstraintDeletionString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getStructConverters, getTempTableForTable, getTransactionIsolation, getTypeConverters, isInformixOuterJoin, isNullAllowedInSelectClause, isXDBDocument, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printValuelist, printValuelist, processResultSet, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, rollbackTransaction, setClassTypes, setCursorCode, setFieldTypes, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPingSQL, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintLockingClauseAfterWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, supportsAutoCommit, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsLocalTempTables, supportsNativeSequenceNumbers, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeUpdateOriginalFromTempTableSql |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
addOperator, addSequence, clone, convertObject, createConnectionCustomizer, createSequences, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString, usesPlatformDefaultSequence |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean useRownumFiltering
protected boolean supportsIdentity
Constructor Detail |
---|
public OraclePlatform()
Method Detail |
---|
public boolean allowsSizeInProcedureArguments()
allowsSizeInProcedureArguments
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected void appendByteArray(byte[] bytes, java.io.Writer writer) throws java.io.IOException
appendByteArray
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendDate(java.sql.Date date, java.io.Writer writer) throws java.io.IOException
appendDate
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendTime(java.sql.Time time, java.io.Writer writer) throws java.io.IOException
appendTime
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer) throws java.io.IOException
appendTimestamp
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendCalendar(java.util.Calendar calendar, java.io.Writer writer) throws java.io.IOException
appendCalendar
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public ExpressionOperator atan2Operator()
protected java.util.Hashtable buildFieldTypes()
buildFieldTypes
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public org.eclipse.persistence.internal.databaseaccess.DatabaseCall buildCallWithReturning(SQLCall sqlCall, java.util.Vector returnFields)
buildCallWithReturning
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean canBuildCallWithReturning()
canBuildCallWithReturning
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getAssignmentString()
getAssignmentString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getDeclareBeginString()
public java.lang.String getBatchBeginString()
getBatchBeginString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getBatchEndString()
getBatchEndString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxFieldNameSize()
getMaxFieldNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.String getProcedureArgumentSetter()
getProcedureArgumentSetter
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureCallHeader()
getProcedureCallHeader
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureCallTail()
getProcedureCallTail
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getSelectForUpdateString()
getSelectForUpdateString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getStoredProcedureTerminationToken()
getStoredProcedureTerminationToken
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery getSystemChangeNumberQuery()
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface org.eclipse.persistence.internal.databaseaccess.Platform
getTimestampQuery
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session) throws java.sql.SQLException
getObjectFromResultSet
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.sql.SQLException
protected void initializePlatformOperators()
initializePlatformOperators
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean isOracle()
isOracle
in interface org.eclipse.persistence.internal.databaseaccess.Platform
isOracle
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
protected ExpressionOperator logOperator()
public java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
buildSelectQueryForSequenceObject
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
sequenceName
- Name known by Oracle to be a defined sequencepublic ValueReadQuery buildSelectQueryForIdentity(java.lang.String seqName, java.lang.Integer size)
buildSelectQueryForIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
sequenceName
- Name known by Oracle to be a defined sequenceprotected ExpressionOperator operatorOuterJoin()
protected ExpressionOperator operatorLocate()
protected ExpressionOperator operatorLocate2()
public void printFieldNullClause(java.io.Writer writer) throws ValidationException
printFieldNullClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
ValidationException
public java.lang.String serverTimestampString()
public void setShouldUseRownumFiltering(boolean useRownumFiltering)
public boolean shouldPrintOuterJoinInWhereClause()
shouldPrintOuterJoinInWhereClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldUseRownumFiltering()
public boolean supportsSequenceObjects()
supportsSequenceObjects
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean supportsIdentity()
supportsIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void setSupportsIdentity(boolean supportsIdentity)
public boolean supportsStoredFunctions()
supportsStoredFunctions
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean supportsSelectForUpdateNoWait()
protected ExpressionOperator todayOperator()
protected ExpressionOperator currentDateOperator()
protected ExpressionOperator currentTimeOperator()
public boolean canUnwrapOracleConnection()
public java.sql.Connection unwrapOracleConnection(java.sql.Connection connection)
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
printSQLSelectStatement
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment, int start) throws java.io.IOException
buildSequenceObjectCreationWriter
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer, java.lang.String fullSeqName) throws java.io.IOException
buildSequenceObjectDeletionWriter
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public java.io.Writer buildSequenceObjectAlterIncrementWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment) throws java.io.IOException
buildSequenceObjectAlterIncrementWriter
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public boolean isAlterSequenceObjectSupported()
isAlterSequenceObjectSupported
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean wasFailureCommunicationBased(java.sql.SQLException exception, java.sql.Connection connection, org.eclipse.persistence.internal.sessions.AbstractSession sessionForProfile)
wasFailureCommunicationBased
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
|
EclipseLink1.0 - 20080707 API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |