Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-02


oracle.toplink.platform.database.oracle
Class OraclePlatform

java.lang.Object
  extended by oracle.toplink.internal.databaseaccess.DatasourcePlatform
      extended by oracle.toplink.internal.databaseaccess.DatabasePlatform
          extended by oracle.toplink.platform.database.DatabasePlatform
              extended by oracle.toplink.platform.database.oracle.OraclePlatform

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.toplink.internal.databaseaccess.Platform
Direct Known Subclasses:
Oracle8Platform

public class OraclePlatform
extends DatabasePlatform

Purpose: Provides Oracle specific behaviour.

Responsibilities:

Since:
TOPLink/Java 1.0
See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE

 

Constructor Summary
OraclePlatform()
           

 

Method Summary
 boolean allowsSizeInProcedureArguments()
          Used for sp defs.
 java.lang.String getBatchBeginString()
          Used for batch writing and sp defs.
 java.lang.String getBatchEndString()
          Used for batch writing and sp defs.
 java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, oracle.toplink.internal.sessions.AbstractSession session)
          Return the catalog information through using the native SQL catalog selects.
 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. although don't actually lock the row.
 java.lang.String getStoredProcedureParameterPrefix()
           
 java.lang.String getStoredProcedureTerminationToken()
           
 ValueReadQuery getSystemChangeNumberQuery()
          The query to select the current system change number from Oracle.
 ValueReadQuery getTimestampQuery()
          This method returns the query to select the timestamp from the server for Oracle.
 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.
 java.lang.String serverTimestampString()
          Return the current date and time from the server.
 void setShouldUseRownumFiltering(boolean useRownumFiltering)
          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()
          Return if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings.
 boolean supportsSelectForUpdateNoWait()
          Returns true if the database supports SQL syntax not to wait on a SELECT..FOR UPADTE (i.e.

 

Methods inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform
addStructConverter, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildProcedureCallString, commitTransaction, copyInto, executeBatch, executeStoredProcedure, getBatchDelimiterString, getClassTypes, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getMaxBatchWritingSize, getNoWaitString, getOutputProcedureToken, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getTransactionIsolation, isInformixOuterJoin, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, rollbackTransaction, setCursorCode, setMaxBatchWritingSize, setPingSQL, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldTrimStrings, shouldUseCustomModifyForCall, supportsAutoCommit, supportsForeignKeyConstraints, supportsNativeSequenceNumbers, supportsPrimaryKeyConstraint, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeParameterMarker

 

Methods inherited from class oracle.toplink.internal.databaseaccess.DatasourcePlatform
addSequence, clone, convertObject, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setSelectSequenceNumberQuery, setSequencePreallocationSize, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

OraclePlatform

public OraclePlatform()

Method Detail

allowsSizeInProcedureArguments

public boolean allowsSizeInProcedureArguments()
Used for sp defs.
Overrides:
allowsSizeInProcedureArguments in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getBatchBeginString

public java.lang.String getBatchBeginString()
Used for batch writing and sp defs.
Overrides:
getBatchBeginString in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getBatchEndString

public java.lang.String getBatchEndString()
Used for batch writing and sp defs.
Overrides:
getBatchEndString in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getNativeTableInfo

public java.util.Vector getNativeTableInfo(java.lang.String table,
                           java.lang.String creator,
                           oracle.toplink.internal.sessions.AbstractSession session)
Return the catalog information through using the native SQL catalog selects. This is required because many JDBC driver do not support meta-data. Willcards can be passed as arguments.

getProcedureArgumentSetter

public java.lang.String getProcedureArgumentSetter()
Used for sp calls.
Overrides:
getProcedureArgumentSetter in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getProcedureCallHeader

public java.lang.String getProcedureCallHeader()
Used for sp calls.
Overrides:
getProcedureCallHeader in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getProcedureCallTail

public java.lang.String getProcedureCallTail()
Used for sp calls.
Overrides:
getProcedureCallTail in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getSelectForUpdateString

public java.lang.String getSelectForUpdateString()
Description copied from class: oracle.toplink.internal.databaseaccess.DatabasePlatform
Most database support a syntax. although don't actually lock the row. Some require the OF some don't like it.
Overrides:
getSelectForUpdateString in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getStoredProcedureParameterPrefix

public java.lang.String getStoredProcedureParameterPrefix()
Overrides:
getStoredProcedureParameterPrefix in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getStoredProcedureTerminationToken

public java.lang.String getStoredProcedureTerminationToken()
Overrides:
getStoredProcedureTerminationToken in class oracle.toplink.internal.databaseaccess.DatabasePlatform

getSystemChangeNumberQuery

public ValueReadQuery getSystemChangeNumberQuery()
The query to select the current system change number from Oracle. In order to execute this query a database administrator may need to grant execute permission on pl/sql package DBMS_FLASHBACK.

getTimestampQuery

public ValueReadQuery getTimestampQuery()
This method returns the query to select the timestamp from the server for Oracle.
Specified by:
getTimestampQuery in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class oracle.toplink.internal.databaseaccess.DatasourcePlatform

isOracle

public boolean isOracle()
Specified by:
isOracle in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
isOracle in class oracle.toplink.internal.databaseaccess.DatasourcePlatform

maximumNumericValues

public java.util.Hashtable maximumNumericValues()
Builds a table of maximum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale

Overrides:
maximumNumericValues in class oracle.toplink.internal.databaseaccess.DatabasePlatform

minimumNumericValues

public java.util.Hashtable minimumNumericValues()
Builds a table of minimum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale

Overrides:
minimumNumericValues in class oracle.toplink.internal.databaseaccess.DatabasePlatform

serverTimestampString

public java.lang.String serverTimestampString()
Return the current date and time from the server.

setShouldUseRownumFiltering

public void setShouldUseRownumFiltering(boolean useRownumFiltering)
Set if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings. Default is false.

shouldPrintOuterJoinInWhereClause

public boolean shouldPrintOuterJoinInWhereClause()
Some database require outer joins to be given in the where clause, others require it in the from clause.
Overrides:
shouldPrintOuterJoinInWhereClause in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldUseJDBCOuterJoinSyntax

public boolean shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.
Overrides:
shouldUseJDBCOuterJoinSyntax in class oracle.toplink.internal.databaseaccess.DatabasePlatform

shouldUseRownumFiltering

public boolean shouldUseRownumFiltering()
Return if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings. Default is false.

setSupportsIdentity

public void setSupportsIdentity(boolean supportsIdentity)
ADVANCED: Oracle db doesn't support identity. However it's possible to get identity-like behaviour using sequence in an insert trigger - that's the only case when supportsIdentity should be set to true: in this case all the sequences that have shouldAcquireValueAfterInsert set to true will keep this setting (it would've been reversed in case identity is not supported). Note that with supportsIdentity==true attempt to create tables that have identity fields will fail - Oracle doesn't support identity. Therefore if there's table creation reqiured it should be done with supportsIdentity==false, then set the flag to true and reset sequencing (or logout and login the session).

supportsSelectForUpdateNoWait

public boolean supportsSelectForUpdateNoWait()
Returns true if the database supports SQL syntax not to wait on a SELECT..FOR UPADTE (i.e. In Oracle adding NOWAIT to the end will accomplish this)

Skip navigation links

Copyright © 1998, 2009, Oracle. All Rights Reserved.