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

B32476-04

oracle.toplink.platform.database
Class DB2Platform

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.DB2Platform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.toplink.internal.databaseaccess.Platform
Direct Known Subclasses:
DB2MainframePlatform, DerbyPlatform

public class DB2Platform
extends DatabasePlatform

Purpose: Provides DB2 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
DB2Platform()
           
 
Method Summary
 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 getProcedureAsString()
          Used for stored procedure defs.
 java.lang.String getProcedureBeginString()
          Used for stored procedure defs.
 java.lang.String getProcedureCallHeader()
          Used for sp calls.
 java.lang.String getProcedureEndString()
          Used for stored procedure defs.
 java.lang.String getSelectForUpdateString()
          Most database support a syntax. although don't actually lock the row.
 ValueReadQuery getTimestampQuery()
          This method returns the query to select the timestamp from the server for DB2.
 boolean isDB2()
           
 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.
 boolean shouldIgnoreException(java.sql.SQLException exception)
          Allow for the platform to ignore exceptions.
 boolean shouldPrintOutputTokenAtStart()
          This is required in the construction of the stored procedures with output parameters
 boolean shouldUseJDBCOuterJoinSyntax()
          JDBC defines and outer join syntax, many drivers do not support this.
 void writeParameterMarker(java.io.Writer writer, oracle.toplink.internal.expressions.ParameterExpression parameter)
           
 
Methods inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform
addStructConverter, allowsSizeInProcedureArguments, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildProcedureCallString, commitTransaction, copyInto, executeBatch, executeStoredProcedure, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getClassTypes, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getMaxBatchWritingSize, getNoWaitString, getOutputProcedureToken, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureCallTail, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getTransactionIsolation, isInformixOuterJoin, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, 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, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldTrimStrings, shouldUseCustomModifyForCall, supportsAutoCommit, supportsForeignKeyConstraints, supportsNativeSequenceNumbers, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding
 
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, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isOracle, 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

DB2Platform

public DB2Platform()
Method Detail

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.


getProcedureCallHeader

public java.lang.String getProcedureCallHeader()
Used for sp calls.

Overrides:
getProcedureCallHeader 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

getProcedureEndString

public java.lang.String getProcedureEndString()
Used for stored procedure defs.

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

getProcedureBeginString

public java.lang.String getProcedureBeginString()
Used for stored procedure defs.

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

getProcedureAsString

public java.lang.String getProcedureAsString()
Used for stored procedure defs.

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

shouldPrintOutputTokenAtStart

public boolean shouldPrintOutputTokenAtStart()
This is required in the construction of the stored procedures with output parameters

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

getTimestampQuery

public ValueReadQuery getTimestampQuery()
This method returns the query to select the timestamp from the server for DB2.

Specified by:
getTimestampQuery in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class oracle.toplink.internal.databaseaccess.DatasourcePlatform

isDB2

public boolean isDB2()
Specified by:
isDB2 in interface oracle.toplink.internal.databaseaccess.Platform
Overrides:
isDB2 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

shouldIgnoreException

public boolean shouldIgnoreException(java.sql.SQLException exception)
Allow for the platform to ignore exceptions. This is required for DB2 which throws no-data modified as an exception.

Overrides:
shouldIgnoreException 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

writeParameterMarker

public void writeParameterMarker(java.io.Writer writer,
                                 oracle.toplink.internal.expressions.ParameterExpression parameter)
                          throws java.io.IOException
Overrides:
writeParameterMarker in class oracle.toplink.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

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