|
EclipseLink 2.2.0, build 'v20110202-r8913' 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.DB2Platform
public class DB2Platform
Purpose: Provides DB2 specific behavior.
Responsibilities:
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform |
---|
DEFAULT_VARCHAR_SIZE |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, fieldTypes, isCastRequired, maxBatchWritingSize, pingSQL, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, endDelimiter, platformOperators, sequences, startDelimiter, tableQualifier, timestampQuery |
Constructor Summary | |
---|---|
DB2Platform()
|
Method Summary | |
---|---|
protected void |
appendByteArray(byte[] bytes,
java.io.Writer writer)
INTERNAL: Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(), otherwise use ODBC format from DatabasePLatform. |
protected void |
appendCalendar(java.util.Calendar calendar,
java.io.Writer writer)
INTERNAL: Append the Timestamp in native format if usesNativeSQL() is true otherwise use ODBC format from DatabasePlatform. |
protected void |
appendDate(java.sql.Date date,
java.io.Writer writer)
INTERNAL: Appends the Date in native format if usesNativeSQL() otherwise use ODBC format from DatabasePlatform. |
protected void |
appendDB2Calendar(java.util.Calendar calendar,
java.io.Writer writer)
Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). |
protected void |
appendDB2Date(java.sql.Date date,
java.io.Writer writer)
INTERNAL: Write a timestamp in DB2 specific format (mm/dd/yyyy). |
protected void |
appendDB2Timestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL: Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff). |
protected void |
appendTime(java.sql.Time time,
java.io.Writer writer)
INTERNAL: Append the Time in Native format if usesNativeSQL() otherwise use ODBC format from DAtabasePlatform. |
protected void |
appendTimestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL: Append the Timestamp in native format if usesNativeSQL() is true otherwise use ODBC format from DatabasePlatform. |
protected java.util.Hashtable |
buildFieldTypes()
|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing. |
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String seqName,
java.lang.Integer size)
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8. |
boolean |
dontBindUpdateAllQueryUsingTempTables()
INTERNAL: DB2 has issues with binding with temp table queries. |
protected java.lang.String |
getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: DB2 allows LIKE to be used to create temp tables, which avoids having to know the types. |
protected java.lang.String |
getCreateTempTableSqlPrefix()
INTERNAL: DB2 temp table syntax. |
protected java.lang.String |
getCreateTempTableSqlSuffix()
INTERNAL: DB2 temp table syntax. |
int |
getMaxFieldNameSize()
INTERNAL: returns the maximum number of characters that can be used in a field name on this platform. |
int |
getMaxForeignKeyNameSize()
INTERNAL: returns the maximum number of characters that can be used in a foreign key name on this platform. |
int |
getMaxUniqueKeyNameSize()
INTERNAL: returns the maximum number of characters that can be used in a unique key name on this platform. |
java.util.Vector |
getNativeTableInfo(java.lang.String table,
java.lang.String creator,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Return the catalog information through using the native SQL catalog selects. |
java.lang.String |
getProcedureAsString()
INTERNAL: Used for stored procedure defs. |
java.lang.String |
getProcedureBeginString()
Used for stored procedure defs. |
java.lang.String |
getProcedureCallHeader()
INTERNAL: Used for sp calls. |
java.lang.String |
getProcedureEndString()
INTERNAL: Used for stored procedure defs. |
java.lang.String |
getSelectForUpdateString()
INTERNAL: Used for pessimistic locking in DB2. |
org.eclipse.persistence.internal.helper.DatabaseTable |
getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: DB2 temp table syntax. |
ValueReadQuery |
getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for DB2. |
protected void |
initializePlatformOperators()
INTERNAL: Initialize any platform-specific operators |
boolean |
isAlterSequenceObjectSupported()
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8. |
boolean |
isDB2()
|
boolean |
isDynamicSQLRequiredForFunctions()
INTERNAL DB2 has some issues with using parameters on certain functions and relations. |
boolean |
isNullAllowedInSelectClause()
INTERNAL: DB2 does not allow NULL in select clause. |
java.util.Hashtable |
maximumNumericValues()
INTERNAL: Builds a table of maximum numeric values keyed on java class. |
java.util.Hashtable |
minimumNumericValues()
INTERNAL: Builds a table of minimum numeric values keyed on java class. |
void |
printFieldIdentityClause(java.io.Writer writer)
INTERNAL: Append the receiver's field 'identity' 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. |
boolean |
shouldIgnoreException(java.sql.SQLException exception)
INTERNAL: Allow for the platform to ignore exceptions. |
boolean |
shouldPrintOutputTokenAtStart()
INTERNAL: This is required in the construction of the stored procedures with output parameters. |
boolean |
shouldUseJDBCOuterJoinSyntax()
INTERNAL: JDBC defines and outer join syntax, many drivers do not support this. |
boolean |
supportsGlobalTempTables()
INTERNAL: DB2 supports temp tables. |
boolean |
supportsIdentity()
INTERNAL: Indicates whether the platform supports identity. |
boolean |
supportsLockingQueriesWithMultipleTables()
INTERNAL: DB2 does not seem to allow FOR UPDATE on queries with multiple tables. |
boolean |
supportsSequenceObjects()
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8. |
void |
writeParameterMarker(java.io.Writer writer,
org.eclipse.persistence.internal.expressions.ParameterExpression parameter,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
INTERNAL: DB2 requires casting on certain operations, such as the CONCAT function, and parameterized queries of the form, ":param = :param". |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildDropIndex, buildProcedureCallString, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxIndexNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureCallTail, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, initialize, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isLockTimeoutException, isXDBDocument, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, processResultSet, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setParameterValueInDatabaseCall, setPingSQL, 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, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsNativeSequenceNumbers, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
addOperator, addSequence, clone, convertObject, createConnectionCustomizer, createSequences, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString, usesPlatformDefaultSequence |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DB2Platform()
Method Detail |
---|
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 appendDB2Date(java.sql.Date date, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendDB2Timestamp(java.sql.Timestamp timestamp, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendDB2Calendar(java.util.Calendar calendar, java.io.Writer writer) throws java.io.IOException
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
protected java.util.Hashtable buildFieldTypes()
buildFieldTypes
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxFieldNameSize()
getMaxFieldNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxForeignKeyNameSize()
getMaxForeignKeyNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxUniqueKeyNameSize()
getMaxUniqueKeyNameSize
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 getProcedureCallHeader()
getProcedureCallHeader
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 getProcedureEndString()
getProcedureEndString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureBeginString()
getProcedureBeginString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureAsString()
getProcedureAsString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface org.eclipse.persistence.internal.databaseaccess.Platform
getTimestampQuery
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
protected void initializePlatformOperators()
initializePlatformOperators
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean isDB2()
isDB2
in interface org.eclipse.persistence.internal.databaseaccess.Platform
isDB2
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
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 boolean shouldIgnoreException(java.sql.SQLException exception)
shouldIgnoreException
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
printFieldIdentityClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
ValidationException
public boolean supportsIdentity()
supportsIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean supportsGlobalTempTables()
supportsGlobalTempTables
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlPrefix()
getCreateTempTableSqlPrefix
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getTempTableForTable
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlSuffix()
getCreateTempTableSqlSuffix
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getCreateTempTableSqlBodyForTable
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean dontBindUpdateAllQueryUsingTempTables()
dontBindUpdateAllQueryUsingTempTables
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isNullAllowedInSelectClause()
isNullAllowedInSelectClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isDynamicSQLRequiredForFunctions()
isDynamicSQLRequiredForFunctions
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void writeParameterMarker(java.io.Writer writer, org.eclipse.persistence.internal.expressions.ParameterExpression parameter, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.databaseaccess.DatabaseCall call) throws java.io.IOException
writeParameterMarker
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public boolean supportsLockingQueriesWithMultipleTables()
supportsLockingQueriesWithMultipleTables
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
public boolean supportsSequenceObjects()
supportsSequenceObjects
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isAlterSequenceObjectSupported()
isAlterSequenceObjectSupported
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
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
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |