oracle.toplink.internal.databaseaccess
Class DB2Platform
java.lang.Object
|
+--oracle.toplink.internal.databaseaccess.DatabasePlatform
|
+--oracle.toplink.internal.databaseaccess.DB2Platform
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- DB2MainframePlatform
- public class DB2Platform
- extends DatabasePlatform
Purpose: Provides DB2 specific behaviour.
Responsibilities:
- Native SQL for byte[], Date, Time, & Timestamp.
- Support for table qualified names.
- Since:
- TOPLink/Java 1.0
- See Also:
- Serialized Form
Method Summary |
java.util.Vector |
getNativeTableInfo(java.lang.String table, java.lang.String creator, oracle.toplink.publicinterface.Session session)
Return the catalog information through using the native SQL catalog selects. |
java.lang.String |
getProcedureCallHeader()
Used for sp calls. |
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 |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this. |
Methods inherited from class oracle.toplink.internal.databaseaccess.DatabasePlatform |
allowsSizeInProcedureArguments, appendParameter, autoCommit, beginTransaction, buildProcedureCallString, clone, commitTransaction, convertObject, copyInto, executeStoredProcedureCall, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getClassTypes, getConversionManager, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getFieldTypeDefinition, getFieldTypes, getInOutputProcedureToken, getJDBCType, getJDBCType, getMaxBatchWritingSize, getOperator, getOutputProcedureToken, getPlatformOperators, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureCallTail, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectSequenceQuery, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getTableQualifier, getTimestampFromServer, getTransactionIsolation, getUpdateSequenceQuery, initializePreallocatedSequences, isAccess, isAttunity, isCloudscape, isDBase, isHSQL, isInformix, isInformixOuterJoin, isODBC, isOracle, isPointBase, isSQLAnywhere, isSQLServer, isSybase, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, rollbackTransaction, setConversionManager, setCursorCode, setMaxBatchWritingSize, setSelectSequenceNumberQuery, setSequenceCounterFieldName, setSequenceNameFieldName, setSequencePreallocationSize, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableQualifier, setTimestampQuery, setTransactionIsolation, setUpdateSequenceQuery, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintInOutputTokenBeforeType, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldTrimStrings, supportsAutoCommit, supportsForeignKeyConstraints, supportsNativeSequenceNumbers, supportsPrimaryKeyConstraint, toString, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeSequencing, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DB2Platform
public DB2Platform()
getNativeTableInfo
public java.util.Vector getNativeTableInfo(java.lang.String table,
java.lang.String creator,
oracle.toplink.publicinterface.Session 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 DatabasePlatform
getSelectForUpdateString
public java.lang.String getSelectForUpdateString()
- Description copied from class:
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 DatabasePlatform
getTimestampQuery
public ValueReadQuery getTimestampQuery()
- This method returns the query to select the timestamp from the server for DB2.
-
- Overrides:
getTimestampQuery
in class DatabasePlatform
isDB2
public boolean isDB2()
-
- Overrides:
isDB2
in class DatabasePlatform
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 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 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 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 DatabasePlatform