Class Informix11Platform
- 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.InformixPlatform
-
- org.eclipse.persistence.platform.database.Informix11Platform
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>
,org.eclipse.persistence.internal.databaseaccess.Platform
public class Informix11Platform extends InformixPlatform
AnInformixPlatform
that fixes many EclipseLink bugs related to Informix support.
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
-
-
Constructor Summary
Constructors Constructor Description Informix11Platform()
Creates a newInformix11Platform
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
dontBindUpdateAllQueryUsingTempTables()
Returnstrue
when invoked to indicate that parameter binding must not be used when working with temporary tables as part of anUPDATE
query.java.lang.Object
getObjectFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int jdbcType, org.eclipse.persistence.internal.sessions.AbstractSession session)
OverridesDatabasePlatform.getObjectFromResultSet(ResultSet, int, int, AbstractSession)
so that if the suppliedjdbcType
is equal toTypes.LONGVARCHAR
, then theResultSet.getString(int)
method (instead of theResultSet.getObject(int)
method) is used to fetch the "raw" value of the column indicated by the suppliedcolumnNumber
from the suppliedResultSet
.org.eclipse.persistence.internal.helper.DatabaseTable
getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
Overrides the superclass implementation to return a newDatabaseTable
with no DatabaseTable.getTableQualifier().boolean
isInformixOuterJoin()
Overrides the default behavior to returnfalse
, indicating that ANSIOUTER JOIN
syntax should be used, since all modern versions of Informix support it.boolean
shouldAlwaysUseTempStorageForModifyAll()
Returnstrue
when invoked to force Informix to use temporary storage when constructing bulkUPDATE
statements.boolean
supportsLocalTempTables()
Returnstrue
when invoked to indicate that Informix does indeed support local temporary tables.void
writeUpdateOriginalFromTempTableSql(java.io.Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields)
OverridesDatabasePlatform.writeUpdateOriginalFromTempTableSql(Writer, DatabaseTable, Collection, Collection)
to ensure that aSET
clause that is supposed to set a value for only one column does not wrap that column name in parentheses.-
Methods inherited from class org.eclipse.persistence.platform.database.InformixPlatform
buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, getMaxFieldNameSize, getSelectForUpdateString, initializeConnectionData, isAlterSequenceObjectSupported, isInformix, maximumNumericValues, minimumNumericValues, printFieldIdentityClause, printFieldTypeSize, requiresProcedureCallBrackets, shouldPrintConstraintNameAfter, shouldSelectIncludeOrderBy, supportsIdentity, supportsSequenceObjects
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, 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, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseJDBCOuterJoinSyntax, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence
-
-
-
-
Constructor Detail
-
Informix11Platform
public Informix11Platform()
Creates a newInformix11Platform
. CallsDatabasePlatform.setShouldBindLiterals(boolean)
withfalse
as a parameter value.- See Also:
- EclipseLink bug 401718
-
-
Method Detail
-
isInformixOuterJoin
public boolean isInformixOuterJoin()
Overrides the default behavior to returnfalse
, indicating that ANSIOUTER JOIN
syntax should be used, since all modern versions of Informix support it.- Overrides:
isInformixOuterJoin
in classInformixPlatform
- Returns:
false
when invoked- See Also:
- EclipseLink bug 401393
-
dontBindUpdateAllQueryUsingTempTables
public boolean dontBindUpdateAllQueryUsingTempTables()
Returnstrue
when invoked to indicate that parameter binding must not be used when working with temporary tables as part of anUPDATE
query.Parsing the English is a little difficult in this method name. It means: "Do not bind parameters in queries that are part of an overall 'update all' operation where temporary tables are being used."
- Overrides:
dontBindUpdateAllQueryUsingTempTables
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Returns:
true
when invoked- See Also:
- EclipseLink bug 402037
-
shouldAlwaysUseTempStorageForModifyAll
public boolean shouldAlwaysUseTempStorageForModifyAll()
Returnstrue
when invoked to force Informix to use temporary storage when constructing bulkUPDATE
statements.- Overrides:
shouldAlwaysUseTempStorageForModifyAll
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Returns:
true
in all cases- See Also:
- EclipseLink bug 402037
-
supportsLocalTempTables
public boolean supportsLocalTempTables()
Returnstrue
when invoked to indicate that Informix does indeed support local temporary tables.local is defined by EclipseLink in
DatabasePlatform
to mean:"Local" means that several threads may create temporary tables with the same name. Local temporary table is created in the beginning of
UpdateAllQuery
execution and dropped in the end of it.- Overrides:
supportsLocalTempTables
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Returns:
true
when invoked- See Also:
- EclipseLink bug 402037
-
getTempTableForTable
public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
Overrides the superclass implementation to return a newDatabaseTable
with no DatabaseTable.getTableQualifier(). Informix 11.50 and above do not support table qualifiers of any kind on temporary tables.- Overrides:
getTempTableForTable
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
table
- theDatabaseTable
for which a temporaryDatabaseTable
should be returned; must not benull
- Returns:
- a new
DatabaseTable
with no table qualifier - Throws:
java.lang.IllegalArgumentException
- iftable
isnull
- See Also:
- EclipseLink bug 402037, EclipseLink bug 402180
-
writeUpdateOriginalFromTempTableSql
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
OverridesDatabasePlatform.writeUpdateOriginalFromTempTableSql(Writer, DatabaseTable, Collection, Collection)
to ensure that aSET
clause that is supposed to set a value for only one column does not wrap that column name in parentheses.The code for this method is identical to that of the stock
H2Platform
, since the H2 database has the same requirement.- Overrides:
writeUpdateOriginalFromTempTableSql
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
writer
- theWriter
that will be writing SQL; must not benull
table
- theDatabaseTable
to be updated; must not benull
pkFields
- aCollection
ofDatabaseField
s each of which is a primary key of the table to be updated; must not benull
assignedFields
- aCollection
ofDatabaseField
s that are receiving updated values; must not benull
- Throws:
java.io.IOException
- if an input/output error is thrown by the suppliedWriter
java.lang.NullPointerException
- if any of the supplied parameters isnull
- See Also:
- EclipseLink bug 402037
-
getObjectFromResultSet
public java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int jdbcType, org.eclipse.persistence.internal.sessions.AbstractSession session) throws java.sql.SQLException
OverridesDatabasePlatform.getObjectFromResultSet(ResultSet, int, int, AbstractSession)
so that if the suppliedjdbcType
is equal toTypes.LONGVARCHAR
, then theResultSet.getString(int)
method (instead of theResultSet.getObject(int)
method) is used to fetch the "raw" value of the column indicated by the suppliedcolumnNumber
from the suppliedResultSet
.This works around an issue with the Informix JDBC driver, version 3.70.JC7 and earlier, where a
TEXT
column is reported to be mappable to the JDBC type ofLONGVARCHAR
, but the actual object returned byResultSet.getObject(int)
is abyte[]
(instead of either achar[]
or aString
). InvokingResultSet.getString(int)
instead returns the desired result.- Overrides:
getObjectFromResultSet
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
resultSet
- theResultSet
to get anObject
from; may benull
columnNumber
- the1
-based column number indicating the column to usejdbcType
- anint
indicating the JDBC type of which the column in theResultSet
indicated by the suppliedcolumnNumber
is expected to besession
- anAbstractSession
that, when used at all, is passed to the superclass implementation of this method; may benull
- Returns:
- the
Object
resulting from a call toResultSet.getObject(int)
; may benull
- Throws:
java.sql.SQLException
- if any error occurs- See Also:
- EclipseLink bug 405645
-
-