EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.platform.database
Class TimesTenPlatform

java.lang.Object
  extended by org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      extended by org.eclipse.persistence.platform.database.DatabasePlatform
          extended by org.eclipse.persistence.platform.database.TimesTenPlatform

public class TimesTenPlatform
extends DatabasePlatform


Constructor Summary
TimesTenPlatform()
           
 
Method Summary
protected  void appendByteArray(byte[] bytes, java.io.Writer writer)
          If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as provided in DatabasePlatform.
protected  void appendCalendar(java.util.Calendar calendar, java.io.Writer writer)
          Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
protected  void appendDate(java.sql.Date date, java.io.Writer writer)
          Appends an MySQL specific date if usesNativeSQL is true otherwise use the ODBC format.
protected  void appendTime(java.sql.Time time, java.io.Writer writer)
          Appends an MySQL specific time if usesNativeSQL is true otherwise use the ODBC format.
protected  void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer)
          Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
protected  java.util.Hashtable buildFieldTypes()
          Return the mapping of class types to database types for the schema framework.
 ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
          INTERNAL: Produce a DataReadQuery which updates(!)
 java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment, int start)
          INTERNAL: Override this method if the platform supports sequence objects.
 java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer, java.lang.String fullSeqName)
          INTERNAL: Override this method if the platform supports sequence objects.
 java.lang.String getCreateViewString()
          INTERNAL: Used for view creation.
protected  java.lang.String getQualifiedSequenceName(java.lang.String seqName)
          Prepend sequence name with table qualifier (if any)
 java.lang.String getSelectForUpdateString()
          INTERNAL: Used for pessimistic locking.
 ValueReadQuery getTimestampQuery()
          PUBLIC: This method returns the query to select the timestamp from the server for TimesTen.
protected  void initializePlatformOperators()
          Initialize any platform-specific operators
 boolean isTimesTen()
          Answers whether platform is TimesTen
protected  ExpressionOperator operatorOuterJoin()
          Create the outer join operator for this platform
 void setSupportsForeignKeyConstraints(boolean supportsForeignKeyConstraints)
           
 boolean shouldPrintOuterJoinInWhereClause()
          Some database require outer joins to be given in the where clause, others require it in the from clause.
 boolean supportsForeignKeyConstraints()
           
 boolean supportsSequenceObjects()
          INTERNAL: Indicates whether the platform supports sequence objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimesTenPlatform

public TimesTenPlatform()
Method Detail

appendByteArray

protected void appendByteArray(byte[] bytes,
                               java.io.Writer writer)
                        throws java.io.IOException
If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as provided in DatabasePlatform.

Throws:
java.io.IOException

appendDate

protected void appendDate(java.sql.Date date,
                          java.io.Writer writer)
                   throws java.io.IOException
Appends an MySQL specific date if usesNativeSQL is true otherwise use the ODBC format. Native FORMAT: 'YYYY-MM-DD'

Throws:
java.io.IOException

appendTime

protected void appendTime(java.sql.Time time,
                          java.io.Writer writer)
                   throws java.io.IOException
Appends an MySQL specific time if usesNativeSQL is true otherwise use the ODBC format. Native FORMAT: 'HH:MM:SS'.

Throws:
java.io.IOException

appendTimestamp

protected void appendTimestamp(java.sql.Timestamp timestamp,
                               java.io.Writer writer)
                        throws java.io.IOException
Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. Native Format: 'YYYY-MM-DD HH:MM:SS'

Throws:
java.io.IOException

appendCalendar

protected void appendCalendar(java.util.Calendar calendar,
                              java.io.Writer writer)
                       throws java.io.IOException
Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. Native Format: 'YYYY-MM-DD HH:MM:SS'

Throws:
java.io.IOException

buildFieldTypes

protected java.util.Hashtable buildFieldTypes()
Return the mapping of class types to database types for the schema framework.


buildSelectQueryForSequenceObject

public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName,
                                                        java.lang.Integer size)
INTERNAL: Produce a DataReadQuery which updates(!) the sequence number in the db and returns it.

Parameters:
sequenceName - Name known by TimesTen to be a defined sequence

getCreateViewString

public java.lang.String getCreateViewString()
INTERNAL: Used for view creation.


getQualifiedSequenceName

protected java.lang.String getQualifiedSequenceName(java.lang.String seqName)
Prepend sequence name with table qualifier (if any)


getSelectForUpdateString

public java.lang.String getSelectForUpdateString()
INTERNAL: Used for pessimistic locking.


getTimestampQuery

public ValueReadQuery getTimestampQuery()
PUBLIC: This method returns the query to select the timestamp from the server for TimesTen.


initializePlatformOperators

protected void initializePlatformOperators()
Initialize any platform-specific operators


isTimesTen

public boolean isTimesTen()
Answers whether platform is TimesTen


operatorOuterJoin

protected ExpressionOperator operatorOuterJoin()
Create the outer join operator for this platform


shouldPrintOuterJoinInWhereClause

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


supportsSequenceObjects

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


supportsForeignKeyConstraints

public boolean supportsForeignKeyConstraints()

setSupportsForeignKeyConstraints

public void setSupportsForeignKeyConstraints(boolean supportsForeignKeyConstraints)

buildSequenceObjectCreationWriter

public java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer,
                                                        java.lang.String fullSeqName,
                                                        int increment,
                                                        int start)
                                                 throws java.io.IOException
INTERNAL: Override this method if the platform supports sequence objects. Returns sql used to create sequence object in the database.

Throws:
java.io.IOException

buildSequenceObjectDeletionWriter

public java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer,
                                                        java.lang.String fullSeqName)
                                                 throws java.io.IOException
INTERNAL: Override this method if the platform supports sequence objects. Returns sql used to delete sequence object from the database.

Throws:
java.io.IOException

EclipseLink 1.0_1.0M2 API Reference - Incubation