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

public Class TimesTenPlatform

extends DatabasePlatform
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.platform.database.TimesTen7Platform
Imports
java.io.*, java.util.ArrayList, .Calendar, .Hashtable, .List, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.DatabaseCall, .FieldTypeDefinition, org.eclipse.persistence.internal.expressions.ParameterExpression, .RelationExpression, org.eclipse.persistence.internal.helper.Helper, org.eclipse.persistence.internal.sessions.AbstractRecord, org.eclipse.persistence.queries.ValueReadQuery

Database platform for the TimesTen database product.

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from org.eclipse.persistence.platform.database.DatabasePlatform:
DEFAULT_VARCHAR_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
appendByteArray(byte[] bytes, Writer writer)

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

If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as provided in DatabasePlatform.
protected void
appendCalendar(Calendar calendar, Writer writer)

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

Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
protected void
appendDate(Date date, Writer writer)

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

Appends an TimesTen specific date if usesNativeSQL is true otherwise use the ODBC format.
protected void
appendTime(Time time, Writer writer)

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

Appends an TimesTen specific time if usesNativeSQL is true otherwise use the ODBC format.
protected void
appendTimestamp(Timestamp timestamp, Writer writer)

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

Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
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
buildSelectQueryForSequenceObject(String
known by TimesTen to be a defined sequence
qualifiedSeqName
,
Integer size)

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

INTERNAL: Produce a DataReadQuery which updates(!) the sequence number in the db and returns it.
public String
public String
public ValueReadQuery
protected void
public boolean
protected ExpressionOperator
operatorOuterJoin()

TimesTen uses the Oracle where clause style outer join.

public void
setSupportsForeignKeyConstraints(boolean supportsForeignKeyConstraints)

public boolean
shouldPrintOuterJoinInWhereClause()

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

Some database require outer joins to be given in the where clause, others require it in the from clause.
public boolean
public boolean
supportsSequenceObjects()

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

INTERNAL: Indicates whether the platform supports sequence objects.
public void
writeParameterMarker(Writer writer, ParameterExpression parameter, AbstractRecord record, DatabaseCall call)

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

INTERNAL: TimesTen and requires cast around parameter markers if both operands of certain operators are parameter markers This method generates CAST for parameter markers whose type is correctly identified by the query compiler.

Field Detail

supportsForeignKeyConstraintsback to summary
private boolean supportsForeignKeyConstraints

Constructor Detail

TimesTenPlatformback to summary
public TimesTenPlatform()

Method Detail

appendByteArrayback to summary
protected void appendByteArray(byte[] bytes, Writer writer) throws IOException

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

If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as provided in DatabasePlatform.

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

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

Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. Native Format: 'YYYY-MM-DD HH:MM:SS'

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

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

Appends an TimesTen specific date if usesNativeSQL is true otherwise use the ODBC format. Native FORMAT: 'YYYY-MM-DD'

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

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

Appends an TimesTen specific time if usesNativeSQL is true otherwise use the ODBC format. Native FORMAT: '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.

Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. Native Format: 'YYYY-MM-DD HH:MM:SS'

Annotations
@Override
buildFieldTypesback to summary
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.

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

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

INTERNAL: Produce a DataReadQuery which updates(!) the sequence number in the db and returns it.

Parameters
qualifiedSeqName:String

known by TimesTen to be a defined sequence

Annotations
@Override
getCreateViewStringback to summary
public String getCreateViewString()

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

INTERNAL: Used for view creation.

Annotations
@Override
getSelectForUpdateStringback to summary
public String getSelectForUpdateString()

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

INTERNAL: Used for pessimistic locking.

Annotations
@Override
getTimestampQueryback to summary
public ValueReadQuery getTimestampQuery()

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

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

PUBLIC: TimesTen uses the Oracle syntax for getting the current timestamp.

Annotations
@Override
initializePlatformOperatorsback to summary
protected void initializePlatformOperators()

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

Initialize any platform-specific operators

Annotations
@Override
isTimesTenback to summary
public boolean isTimesTen()

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

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

Annotations
@Override
operatorOuterJoinback to summary
protected ExpressionOperator operatorOuterJoin()

TimesTen uses the Oracle where clause style outer join.

setSupportsForeignKeyConstraintsback to summary
public void setSupportsForeignKeyConstraints(boolean supportsForeignKeyConstraints)
shouldPrintOuterJoinInWhereClauseback to summary
public boolean shouldPrintOuterJoinInWhereClause()

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

Some database require outer joins to be given in the where clause, others require it in the from clause.

Annotations
@Override
supportsForeignKeyConstraintsback to summary
public boolean supportsForeignKeyConstraints()

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

Annotations
@Override
supportsSequenceObjectsback to summary
public boolean supportsSequenceObjects()

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

INTERNAL: Indicates whether the platform supports sequence objects.

Annotations
@Override
writeParameterMarkerback to summary
public void writeParameterMarker(Writer writer, ParameterExpression parameter, AbstractRecord record, DatabaseCall call) throws IOException

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

INTERNAL: TimesTen and requires cast around parameter markers if both operands of certain operators are parameter markers This method generates CAST for parameter markers whose type is correctly identified by the query compiler. This is not used by default, only if isCastRequired is set to true, by default dynamic SQL is used to avoid the issue in only the required cases.

Annotations
@Override