|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.MySQL4Platform
public class MySQL4Platform
Purpose: Provides MySQL specific behaviour.
Responsibilities:
Constructor Summary | |
---|---|
MySQL4Platform()
|
Method Summary | |
---|---|
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 |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing. |
protected ExpressionOperator |
currentDateOperator()
INTERNAL: Create the current date operator for this platform. |
protected ExpressionOperator |
dateToStringOperator()
INTERNAL: Build MySQL equivalent to TO_CHAR. |
java.lang.String |
getConstraintDeletionString()
INTERNAL: Used for constraint deletion. |
protected java.lang.String |
getCreateTempTableSqlBodyForTable(DatabaseTable table)
INTERNAL: |
protected java.lang.String |
getCreateTempTableSqlPrefix()
INTERNAL: MySQL temp table syntax, used for update-all, delete-all queries. |
java.lang.String |
getIdentifierQuoteCharacter()
INTERNAL: MySQL uses ' to allow identifier to have spaces. |
java.lang.String |
getInOutputProcedureToken()
INTERNAL: MySQL uses the INOUT keyword for this. |
java.lang.String |
getProcedureAsString()
MySQL does not use the AS token. |
java.lang.String |
getProcedureBeginString()
INTERNAL: MySQL requires BEGIN. |
java.lang.String |
getProcedureCallHeader()
INTERNAL: Used for stored procedure calls. |
java.lang.String |
getProcedureEndString()
INTERNAL: MySQL requires END. |
java.lang.String |
getSelectForUpdateString()
INTERNAL: Used for pessimistic locking. |
ValueReadQuery |
getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for MySQL. |
protected void |
initializePlatformOperators()
Initialize any platform-specific operators. |
boolean |
isMySQL()
Answers whether platform is MySQL. |
protected ExpressionOperator |
leftTrim2()
INTERNAL: Build MySQL equivalent to LTRIM(string_exp, character). |
protected ExpressionOperator |
logOperator()
INTERNAL: Create the 10 based log operator for this platform. |
void |
printFieldIdentityClause(java.io.Writer writer)
INTERNAL: Append the receiver's field 'identity' constraint clause to a writer. |
protected ExpressionOperator |
rightTrim2()
INTERNAL: Build MySQL equivalent to RTRIM(string_exp, character). |
boolean |
shouldAlwaysUseTempStorageForModifyAll()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries. |
boolean |
shouldPrintOutputTokenAtStart()
INTERNAL: MySQL requires the direction at the start of the argument. |
boolean |
shouldPrintStoredProcedureArgumentNameInCall()
INTERNAL: MySQL stored procedure calls do not require the argument name be printed in the call string e.g. call MyStoredProc(?) |
boolean |
shouldUseJDBCOuterJoinSyntax()
INTERNAL: JDBC defines an outer join syntax which many drivers do not support. |
boolean |
supportsGlobalTempTables()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries. |
boolean |
supportsIdentity()
INTERNAL: Indicates whether the platform supports identity. |
protected ExpressionOperator |
toCharOperator()
INTERNAL: Build MySQL equivalent to TO_CHAR. |
protected ExpressionOperator |
toDateOperator()
INTERNAL: Build MySQL equivalent to TO_DATE. |
protected ExpressionOperator |
toNumberOperator()
INTERNAL: Build MySQL equivalent to TO_NUMBER. |
void |
writeDeleteFromTargetTableUsingTempTableSql(java.io.Writer writer,
DatabaseTable table,
DatabaseTable targetTable,
java.util.Collection pkFields,
java.util.Collection targetPkFields)
INTERNAL: Writes MySQL specific SQL for accessing temp tables for delete-all queries. |
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
INTERNAL: Writes MySQL specific SQL for accessing temp tables for update-all queries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MySQL4Platform()
Method Detail |
---|
protected void appendDate(java.sql.Date date, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendTime(java.sql.Time time, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendCalendar(java.util.Calendar calendar, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected java.util.Hashtable buildFieldTypes()
public ValueReadQuery buildSelectQueryForIdentity()
public java.lang.String getConstraintDeletionString()
public java.lang.String getSelectForUpdateString()
public ValueReadQuery getTimestampQuery()
public boolean isMySQL()
protected void initializePlatformOperators()
protected ExpressionOperator logOperator()
protected ExpressionOperator toNumberOperator()
protected ExpressionOperator toDateOperator()
protected ExpressionOperator toCharOperator()
protected ExpressionOperator dateToStringOperator()
protected ExpressionOperator leftTrim2()
protected ExpressionOperator rightTrim2()
protected ExpressionOperator currentDateOperator()
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
ValidationException
public boolean shouldUseJDBCOuterJoinSyntax()
public boolean supportsIdentity()
public boolean supportsGlobalTempTables()
protected java.lang.String getCreateTempTableSqlPrefix()
protected java.lang.String getCreateTempTableSqlBodyForTable(DatabaseTable table)
public boolean shouldAlwaysUseTempStorageForModifyAll()
public boolean shouldPrintStoredProcedureArgumentNameInCall()
public java.lang.String getIdentifierQuoteCharacter()
public java.lang.String getInOutputProcedureToken()
public java.lang.String getProcedureAsString()
public boolean shouldPrintOutputTokenAtStart()
public java.lang.String getProcedureCallHeader()
public java.lang.String getProcedureBeginString()
public java.lang.String getProcedureEndString()
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
java.io.IOException
public void writeDeleteFromTargetTableUsingTempTableSql(java.io.Writer writer, DatabaseTable table, DatabaseTable targetTable, java.util.Collection pkFields, java.util.Collection targetPkFields) throws java.io.IOException
java.io.IOException
|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |