Class DB2ZPlatform
-
- All Implemented Interfaces:
Serializable
,Cloneable
,CorePlatform<ConversionManager>
,Platform
public class DB2ZPlatform extends DB2Platform
Purpose: Provides DB2 z/OS specific behavior.This provides for some additional compatibility in certain DB2 versions.
Responsibilities:
- Support creating tables that handle multibyte characters
- See Also:
- Serialized Form
-
-
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
batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
-
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery
-
-
Constructor Summary
Constructors Constructor Description DB2ZPlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Hashtable
buildFieldTypes()
Return the mapping of class types to database types for the schema framework.String
buildProcedureCallString(StoredProcedureCall call, AbstractSession session, AbstractRecord row)
INTERNAL: Used for sp calls.Object
getParameterValueFromDatabaseCall(CallableStatement statement, String name, AbstractSession session)
INTERNAL Get the parameter from the JDBC statement with the given name.String
getProcedureArgument(String name, Object parameter, Integer parameterType, StoredProcedureCall call, AbstractSession session)
Obtain the platform specific argument stringString
getProcedureOptionList()
DB2 on Z uses ":" as prefix for procedure arguments.String
getTableCreationSuffix()
PUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation).boolean
isDB2Z()
void
registerOutputParameter(CallableStatement statement, String name, int jdbcType)
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.void
registerOutputParameter(CallableStatement statement, String name, int jdbcType, String typeName)
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.protected void
setNullFromDatabaseField(DatabaseField databaseField, CallableStatement statement, String name)
void
setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session)
INTERNAL Set the parameter in the JDBC statement with the given name.-
Methods inherited from class org.eclipse.persistence.platform.database.DB2Platform
appendByteArray, appendCalendar, appendDate, appendDB2Calendar, appendDB2Date, appendDB2Timestamp, appendTime, appendTimestamp, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, dontBindUpdateAllQueryUsingTempTables, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxUniqueKeyNameSize, getNativeTableInfo, getNoWaitString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureEndString, getSelectForUpdateString, getTempTableForTable, getTimestampQuery, initializeConnectionData, initializePlatformOperators, isAlterSequenceObjectSupported, isDB2, isDynamicSQLRequiredForFunctions, isNullAllowedInSelectClause, maximumNumericValues, minimumNumericValues, printFieldIdentityClause, printFieldTypeSize, printSQLSelectStatement, shouldIgnoreException, shouldPrintForUpdateClause, shouldPrintOutputTokenAtStart, shouldUseJDBCOuterJoinSyntax, supportsGlobalTempTables, supportsIdentity, supportsLockingQueriesWithMultipleTables, supportsOrderByParameters, supportsSequenceObjects, writeParameterMarker
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkTableExists, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxIndexNameSize, getObjectFromResultSet, getOutputProcedureToken, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureCallTail, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceBindAllParameters, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, 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, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence
-
-
-
-
Method Detail
-
buildFieldTypes
protected Hashtable buildFieldTypes()
Description copied from class:DatabasePlatform
Return the mapping of class types to database types for the schema framework.- Overrides:
buildFieldTypes
in classDB2Platform
-
getTableCreationSuffix
public String getTableCreationSuffix()
Description copied from class:DatabasePlatform
PUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation). This value will be appended to CreationSuffix strings stored on the DatabaseTable or TableDefinition.- Overrides:
getTableCreationSuffix
in classDatabasePlatform
-
getProcedureArgument
public String getProcedureArgument(String name, Object parameter, Integer parameterType, StoredProcedureCall call, AbstractSession session)
Description copied from class:DB2Platform
Obtain the platform specific argument string- Overrides:
getProcedureArgument
in classDB2Platform
-
getProcedureOptionList
public String getProcedureOptionList()
DB2 on Z uses ":" as prefix for procedure arguments.- Overrides:
getProcedureOptionList
in classDatabasePlatform
- See Also:
StoredProcedureDefinition
-
isDB2Z
public boolean isDB2Z()
- Specified by:
isDB2Z
in interfacePlatform
- Overrides:
isDB2Z
in classDatasourcePlatform
-
buildProcedureCallString
public String buildProcedureCallString(StoredProcedureCall call, AbstractSession session, AbstractRecord row)
INTERNAL: Used for sp calls. PostGreSQL uses a different method for executing StoredProcedures than other platforms.- Overrides:
buildProcedureCallString
in classDatabasePlatform
-
registerOutputParameter
public void registerOutputParameter(CallableStatement statement, String name, int jdbcType) throws SQLException
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.- Overrides:
registerOutputParameter
in classDatabasePlatform
- Throws:
SQLException
- See Also:
CallableStatement.registerOutParameter(String parameterName, int sqlType)
-
registerOutputParameter
public void registerOutputParameter(CallableStatement statement, String name, int jdbcType, String typeName) throws SQLException
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.- Overrides:
registerOutputParameter
in classDatabasePlatform
- Throws:
SQLException
- See Also:
CallableStatement.registerOutParameter(String parameterName, int sqlType, String typeName)
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session) throws SQLException
Description copied from class:DatabasePlatform
INTERNAL Set the parameter in the JDBC statement with the given name. This support a wide range of different parameter types, and is heavily optimized for common types.- Overrides:
setParameterValueInDatabaseCall
in classDatabasePlatform
- Throws:
SQLException
-
setNullFromDatabaseField
protected void setNullFromDatabaseField(DatabaseField databaseField, CallableStatement statement, String name) throws SQLException
- Overrides:
setNullFromDatabaseField
in classDatabasePlatform
- Throws:
SQLException
-
getParameterValueFromDatabaseCall
public Object getParameterValueFromDatabaseCall(CallableStatement statement, String name, AbstractSession session) throws SQLException
Description copied from class:DatabasePlatform
INTERNAL Get the parameter from the JDBC statement with the given name.- Overrides:
getParameterValueFromDatabaseCall
in classDatabasePlatform
- Throws:
SQLException
-
-