Top Description Fields Constructors Methods
org.eclipse.persistence.platform.database

public Class InformixPlatform

extends DatabasePlatform
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.platform.database.Informix11Platform
Imports
java.io.IOException, .StringWriter, .Writer, java.sql.Connection, .SQLException, java.util.Calendar, .Hashtable, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition, org.eclipse.persistence.internal.helper.Helper, org.eclipse.persistence.queries.ValueReadQuery, org.eclipse.persistence.tools.schemaframework.FieldDefinition

Purpose: Provides Informix specific behavior.

Responsibilities:

Since
TOPLink/Java 1.0.1

Field Summary

Inherited from org.eclipse.persistence.platform.database.DatabasePlatform:
DEFAULT_VARCHAR_SIZE

Constructor Summary

AccessConstructor and Description
public
InformixPlatform()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected void
appendCalendar(Calendar calendar, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendCalendar.

Answer a platform correct string representation of a Calendar, suitable for SQL generation.
protected void
appendDate(Date date, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendDate.

Answer a platform correct string representation of a Date, suitable for SQL generation.
protected void
appendInformixCalendar(Calendar calendar, Writer writer)

Write a timestamp in Informix specific format ( yyyy-mm-dd hh:mm:ss.fff)

protected void
appendInformixTimestamp(Timestamp timestamp, Writer writer)

Write a timestamp in Informix specific format (yyyy-mm-dd hh:mm:ss.fff).

protected void
appendTime(Time time, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTime.

Answer a platform correct string representation of a Time, suitable for SQL generation.
protected void
appendTimestamp(Timestamp timestamp, Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTimestamp.

Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
protected Hashtable<Class<?>, FieldTypeDefinition>
buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.
public ValueReadQuery
public ValueReadQuery
buildSelectQueryForSequenceObject(String qualifiedSeqName, Integer size)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildSelectQueryForSequenceObject.

INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence).
public int
getMaxFieldNameSize()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
public String
getSelectForUpdateString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Informix seems to like this syntax instead of the OF * syntax.
public void
protected void
public boolean
isAlterSequenceObjectSupported()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isAlterSequenceObjectSupported.

INTERNAL: Override this method if the platform supports sequence objects and it's possible to alter sequence object's increment in the database.
public boolean
public boolean
isInformixOuterJoin()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isInformixOuterJoin.

Some database require outer joins to be given in the where clause, others require it in the from clause.
public Hashtable<Class<? extends Number>, ? super Number>
maximumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.maximumNumericValues.

Builds a table of maximum numeric values keyed on java class.
public Hashtable<Class<? extends Number>, ? super Number>
minimumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.minimumNumericValues.

Builds a table of minimum numeric values keyed on java class.
public void
printFieldIdentityClause(Writer writer)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field serial constraint clause to a writer.
public void
printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldTypeSize.

Append the field type to a writer unless the field uses an Identity strategy to generate its value.
public boolean
public boolean
shouldPrintConstraintNameAfter()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintConstraintNameAfter.

Some Platforms want the constraint name after the constraint definition.
public boolean
public boolean
supportsIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity.
public boolean
supportsSequenceObjects()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsSequenceObjects.

INTERNAL: Indicates whether the platform supports sequence objects.

Constructor Detail

InformixPlatformback to summary
public InformixPlatform()

Default constructor.

Method Detail

appendCalendarback to summary
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendCalendar.

Answer a platform correct string representation of a Calendar, suitable for SQL generation. The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}.

Annotations
@Override
appendDateback to summary
protected void appendDate(Date date, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendDate.

Answer a platform correct string representation of a Date, suitable for SQL generation. Native format: 'yyyy-mm-dd

Annotations
@Override
appendInformixCalendarback to summary
protected void appendInformixCalendar(Calendar calendar, Writer writer) throws IOException

Write a timestamp in Informix specific format ( yyyy-mm-dd hh:mm:ss.fff)

appendInformixTimestampback to summary
protected void appendInformixTimestamp(Timestamp timestamp, Writer writer) throws IOException

Write a timestamp in Informix specific format (yyyy-mm-dd hh:mm:ss.fff).

appendTimeback to summary
protected void appendTime(Time time, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTime.

Answer a platform correct string representation of a Time, suitable for SQL generation. The time is printed in the ODBC platform independent format {t'hh:mm:ss'}.

Annotations
@Override
appendTimestampback to summary
protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.appendTimestamp.

Answer a platform correct string representation of a Timestamp, suitable for SQL generation. The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}.

Annotations
@Override
buildFieldTypesback to summary
protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.

Annotations
@Override
buildSelectQueryForIdentityback to summary
public ValueReadQuery buildSelectQueryForIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildSelectQueryForIdentity.

INTERNAL: Build the identity query for native sequencing.

Annotations
@Override
buildSelectQueryForSequenceObjectback to summary
public ValueReadQuery buildSelectQueryForSequenceObject(String qualifiedSeqName, Integer size)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.buildSelectQueryForSequenceObject.

INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence). This method is called when sequence object NativeSequence is connected, the returned query used until the sequence is disconnected. If the platform supportsSequenceObjects then (at least) one of buildSelectQueryForSequenceObject methods should return non-null query.

Annotations
@Override
getMaxFieldNameSizeback to summary
public int getMaxFieldNameSize()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.

Annotations
@Override
getSelectForUpdateStringback to summary
public String getSelectForUpdateString()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getSelectForUpdateString.

Informix seems to like this syntax instead of the OF * syntax.

Annotations
@Override
initializeConnectionDataback to summary
public void initializeConnectionData(Connection connection) throws SQLException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.initializeConnectionData.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.initializeConnectionData.

INTERNAL: Allow initialization from the connection.

Annotations
@Override
initializePlatformOperatorsback to summary
protected void initializePlatformOperators()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.initializePlatformOperators.

INTERNAL: Initialize any platform-specific operators

Annotations
@Override
isAlterSequenceObjectSupportedback to summary
public boolean isAlterSequenceObjectSupported()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isAlterSequenceObjectSupported.

INTERNAL: Override this method if the platform supports sequence objects and it's possible to alter sequence object's increment in the database.

Annotations
@Override
isInformixback to summary
public boolean isInformix()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.isInformix.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.isInformix.

Annotations
@Override
isInformixOuterJoinback to summary
public boolean isInformixOuterJoin()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.isInformixOuterJoin.

Some database require outer joins to be given in the where clause, others require it in the from clause. Informix requires it in the from clause with no ON expression.

Annotations
@Override
maximumNumericValuesback to summary
public Hashtable<Class<? extends Number>, ? super Number> maximumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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

Annotations
@Override
minimumNumericValuesback to summary
public Hashtable<Class<? extends Number>, ? super Number> minimumNumericValues()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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

Annotations
@Override
printFieldIdentityClauseback to summary
public void printFieldIdentityClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldIdentityClause.

Append the receiver's field serial constraint clause to a writer.

Annotations
@Override
printFieldTypeSizeback to summary
public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws IOException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printFieldTypeSize.

Append the field type to a writer unless the field uses an Identity strategy to generate its value. In this case, the field type 'SERIAL' will be appended later.

Annotations
@Override
requiresProcedureCallBracketsback to summary
public boolean requiresProcedureCallBrackets()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureCallBrackets.

Used for sp calls.

Annotations
@Override
shouldPrintConstraintNameAfterback to summary
public boolean shouldPrintConstraintNameAfter()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintConstraintNameAfter.

Some Platforms want the constraint name after the constraint definition.

Annotations
@Override
shouldSelectIncludeOrderByback to summary
public boolean shouldSelectIncludeOrderBy()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.shouldSelectIncludeOrderBy.

Informix seemed to require this at some point. Not sure if it still does.

Annotations
@Override
supportsIdentityback to summary
public boolean supportsIdentity()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity. Informix does this through SERIAL field types. This method is to be used *ONLY* by sequencing classes

Annotations
@Override
supportsSequenceObjectsback to summary
public boolean supportsSequenceObjects()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.supportsSequenceObjects.

INTERNAL: Indicates whether the platform supports sequence objects. This method is to be used *ONLY* by sequencing classes

Annotations
@Override