EclipseLink 2.3.2, build 'v20111125-r10461' API Reference

org.eclipse.persistence.platform.database
Class SymfowarePlatform

java.lang.Object
  extended by org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      extended by org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
          extended by org.eclipse.persistence.platform.database.DatabasePlatform
              extended by org.eclipse.persistence.platform.database.SymfowarePlatform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.internal.databaseaccess.Platform

public class SymfowarePlatform
extends DatabasePlatform

Symfoware Server
http://wiki.eclipse.org/EclipseLink/Development/Incubator/Extensions/SymfowarePlatform
Test results: http://wiki.eclipse.org/EclipseLink/Development/DatabasePlatform/SymfowarePlatform/TestResults
Contributed by: Fujitsu Ltd.
Contributed under bug: 288715

Developed on Symfoware Server V10
Initial SRG Passes on Symfoware Server V10

Feature Testing
----------------------


Limitations
----------------

Additional Notes
----------------

See Also:
Serialized Form
Author:
Dies Koper, Wu Jie
Since:
EclipseLink 2.1

Field Summary
 
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery
 
Constructor Summary
SymfowarePlatform()
           
 
Method Summary
protected static ExpressionOperator addDate()
          Adds to a date the specified addition number as the specified interval unit and returns the resulting date.
protected  void addNonBindingOperator(ExpressionOperator operator)
          Symfoware does not support the use of parameters in certain functions.
protected  void appendCalendar(java.util.Calendar calendar, java.io.Writer writer)
          Write a Calendar in Symfoware specific format.
protected  void appendDate(java.sql.Date date, java.io.Writer writer)
          Appends a Date in Symfoware specific format.
protected  void appendTime(java.sql.Time time, java.io.Writer writer)
          Appends a Time in Symfoware specific format.
protected  void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer)
          Appends a TimeStamp in Symfoware specific format.
protected  java.util.Map<java.lang.String,java.lang.Class> buildClassTypes()
          Return the mapping of database types to class types for the schema framework.
 java.lang.String buildCreateIndex(java.lang.String fullTableName, java.lang.String indexName, java.lang.String qualifier, boolean isUnique, java.lang.String... columnNames)
          Return the CREATE INDEX string for this platform.
 java.lang.String buildDropIndex(java.lang.String fullTableName, java.lang.String indexName, java.lang.String qualifier)
          Return the DROP INDEX string for this platform.
protected  java.util.Hashtable<java.lang.Class<?>,org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> buildFieldTypes()
          Return the mapping of Java class types to database types for the schema framework.
 ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
          Produce a DataReadQuery which updates(!)
protected static ExpressionOperator charLength()
          Obtains the number of characters in the data string value expression.
 int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
          Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL.
 java.lang.String getCreateTempTableSqlPrefix()
          Returns the beginning of the SQL string to create a temporary table.
protected  java.lang.String getCreateTempTableSqlSuffix()
          Returns the ending of the SQL string to create a temporary table.
 java.lang.String getDefaultSequenceTableName()
          Returns the table name used by TableSequence by default.
 java.lang.String getIndexNamePrefix(boolean isUniqueSetOnField)
          Used to allow platforms to define their own index prefixes
 java.lang.String getInOutputProcedureToken()
          This method is used to print the output parameter token when stored procedures are called.
 java.lang.String getInputProcedureToken()
          Used for stored procedure creation: Prefix for INPUT parameters.
 int getMaxFieldNameSize()
          Returns the maximum number of single byte characters that can be used in a field name on this platform, assuming DEFAULT_DSI_NAME=CODE is specified in Symfoware's operating environment file for the system (see Symfoware manual).
 java.lang.String getProcedureAsString()
          Symfoware does not use the AS token.
 java.lang.String getProcedureBeginString()
          Used for stored procedure definitions.
 java.lang.String getProcedureCallHeader()
          Used for stored procedure calls.
 java.lang.String getProcedureCallTail()
          Used for stored procedure calls.
 java.lang.String getProcedureEndString()
          Used for stored procedure definitions.
 java.lang.String getSelectForUpdateString()
          Symfoware supports "for update" for row locking.
 ValueReadQuery getTimestampQuery()
          This method returns the query to select the timestamp from the database.
protected static ExpressionOperator greatest()
          Returns the greatest of two values.
protected  void initializePlatformOperators()
          Initialize Symfoware platform-specific operators.
protected static ExpressionOperator instring()
          Evaluates the location of the "tofind" text within the string_exp text.
 boolean isDynamicSQLRequiredForFunctions()
          Symfoware does not support the use of multiple parameters in certain functions.
 boolean isForUpdateCompatibleWithDistinct()
          Indicates whether SELECT DISTINCT ...
 boolean isSymfoware()
          Identifies this database platform as Symfoware's.
protected static ExpressionOperator least()
          Returns the smallest of two values.
protected static ExpressionOperator leftTrim()
          Returns the string left trimmed for white space.
protected static ExpressionOperator leftTrim2()
          Returns the string left trimmed for white space.
protected static ExpressionOperator length()
          Obtains the number of characters in the data string value expression.
protected static ExpressionOperator locate()
          Evaluates the location of the "tofind" text within the string_exp text.
protected static ExpressionOperator locate2()
          Evaluates the location of the "tofind" text within the "string_exp" text, starting from the given start position.
protected static ExpressionOperator logOperator()
          Returns the log10 operator.
 long minimumTimeIncrement()
          INTERNAL: Returns the minimum time increment supported by the platform.
protected static ExpressionOperator mod()
          Returns the remainder of a division.
protected static ExpressionOperator monthsBetween()
          Returns the decimal number of months between the two dates.
protected static ExpressionOperator nvl()
          Substitute a value when a null value is encountered.
 void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
          Print the pagination SQL using Symfoware syntax " WITH OPTION LIMIT ()".
 boolean requiresProcedureBrackets()
          Used for stored procedure creation: Symfoware needs brackets around arguments declaration even if no arguments exist, and so returns true.
 boolean requiresUniqueConstraintCreationOnTableCreate()
          Used for table creation.
 void retrieveFirstPrimaryKeyOrOne(ReportQuery subselect)
          INTERNAL: Used by Exists queries because they just need to select a single row.
protected static ExpressionOperator rightTrim()
          Returns the string right trimmed for white space.
protected static ExpressionOperator rightTrim2()
          Returns the string right trimmed for white space.
protected static ExpressionOperator roundDate()
          Returns the date rounded to the year, month or day.
 boolean shouldAlwaysUseTempStorageForModifyAll()
          Symfoware does not support the default syntax generated for update-all and delete-all queries as they can include the same table in the FROM clause of the main and the sub-queries.
 boolean shouldBindLiterals()
          Allows platform to choose whether to bind literals in SQL statements or not.
 boolean shouldCreateIndicesForPrimaryKeys()
          Used for table creation.
 boolean shouldCreateIndicesOnUniqueKeys()
          Used for table creation.
 boolean shouldPrintInputTokenAtStart()
          Used for stored procedure creation: Some platforms want to print prefix for INPUT arguments BEFORE NAME.
 boolean shouldPrintOutputTokenAtStart()
          This is required in the construction of the stored procedures with output parameters
 boolean shouldPrintOutputTokenBeforeType()
          This is required in the construction of the stored procedures with output parameters
 boolean shouldPrintStoredProcedureArgumentNameInCall()
          Symfoware stored procedure calls do not require the argument name be printed in the call string.
 boolean shouldPrintStoredProcedureVariablesAfterBeginString()
          Used for stored procedure creation: Symfoware declares variables AFTER the procedure body's BEGIN string.
protected static ExpressionOperator singleArgumentSubstring()
          Gets the substring of a string starting from the specified start position.
protected static ExpressionOperator substring()
          Gets the substring of source bounded by start location to end location.
 boolean supportsANSIInnerJoinSyntax()
          Indicates whether the ANSI syntax for inner joins (e.g.
 boolean supportsForeignKeyConstraints()
          Symfoware does not support foreign key constraint syntax, so returns false.
 boolean supportsGlobalTempTables()
          Indicates whether the platform supports global temporary tables.
 boolean supportsIndividualTableLocking()
          Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.
 boolean supportsLockingQueriesWithMultipleTables()
          Indicates whether locking clause could be applied to the query that has more than one table.
 boolean supportsSequenceObjects()
          Indicates whether the platform supports sequence objects.
 boolean supportsStoredFunctions()
          Indicates whether the platform supports stored functions.
 boolean supportsUniqueKeyConstraints()
          Symfoware supports unique key constraints, so returns true.
protected static ExpressionOperator toDate()
          Converts the character value expression of the conversion source to the DATE type in accordance.
protected static ExpressionOperator toNumber()
          Returns the number converted from the string.
protected static ExpressionOperator truncateDate()
          Truncates a date by using the truncating unit.
 boolean wasFailureCommunicationBased(java.sql.SQLException exception, java.sql.Connection connection, org.eclipse.persistence.internal.sessions.AbstractSession sessionForProfile)
          Fail-over is not implemented on platform.
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendByteArray, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildDropIndex, buildProcedureCallString, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateTempTableSqlBodyForTable, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isInformixOuterJoin, isLockTimeoutException, isNullAllowedInSelectClause, isXDBDocument, maximumNumericValues, minimumNumericValues, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, rollbackTransaction, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseJDBCOuterJoinSyntax, shouldUseRownumFiltering, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsIdentity, supportsIndexes, supportsLocalTempTables, supportsNativeSequenceNumbers, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString, usesPlatformDefaultSequence
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SymfowarePlatform

public SymfowarePlatform()
Method Detail

appendDate

protected void appendDate(java.sql.Date date,
                          java.io.Writer writer)
                   throws java.io.IOException
Appends a Date in Symfoware specific format.
Symfoware: DATE'YYYY-MM-DD'

Overrides:
appendDate in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendTime

protected void appendTime(java.sql.Time time,
                          java.io.Writer writer)
                   throws java.io.IOException
Appends a Time in Symfoware specific format.
Symfoware: TIME'hh:mm:ss'

Overrides:
appendTime in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendTimestamp

protected void appendTimestamp(java.sql.Timestamp timestamp,
                               java.io.Writer writer)
                        throws java.io.IOException
Appends a TimeStamp in Symfoware specific format.
Note that Symfoware does not support the milli- and nanoseconds.
Symfoware: TIMESTAMP'YYYY-MM-DD hh:mm:ss'

Overrides:
appendTimestamp in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

appendCalendar

protected void appendCalendar(java.util.Calendar calendar,
                              java.io.Writer writer)
                       throws java.io.IOException
Write a Calendar in Symfoware specific format.
Note that Symfoware does not support nanoseconds.
Symfoware: CNV_TIMESTAMP(calendar, 'YYYY-MM-DD hh24:mm:ss')

Overrides:
appendCalendar in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

buildFieldTypes

protected java.util.Hashtable<java.lang.Class<?>,org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> buildFieldTypes()
Return the mapping of Java class types to database types for the schema framework.

Overrides:
buildFieldTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
hashtable of Java types to FieldTypeDefinition instances containing Symfoware SQL types.

buildClassTypes

protected java.util.Map<java.lang.String,java.lang.Class> buildClassTypes()
Return the mapping of database types to class types for the schema framework.

Overrides:
buildClassTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
the mappings.

initializePlatformOperators

protected void initializePlatformOperators()
Initialize Symfoware platform-specific operators.

Overrides:
initializePlatformOperators in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

addNonBindingOperator

protected void addNonBindingOperator(ExpressionOperator operator)
Symfoware does not support the use of parameters in certain functions.
This adds the operator and disables binding support at the same time.

See Also:
DatasourcePlatform.addOperator(ExpressionOperator), ExpressionOperator.setIsBindingSupported(boolean)

isDynamicSQLRequiredForFunctions

public boolean isDynamicSQLRequiredForFunctions()
Symfoware does not support the use of multiple parameters in certain functions.
This allows statements to disable binding only in these cases.

Overrides:
isDynamicSQLRequiredForFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

isForUpdateCompatibleWithDistinct

public boolean isForUpdateCompatibleWithDistinct()
Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform. (Symfoware doesn't allow this).

Overrides:
isForUpdateCompatibleWithDistinct in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

isSymfoware

public boolean isSymfoware()
Identifies this database platform as Symfoware's.

Specified by:
isSymfoware in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
isSymfoware in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

length

protected static ExpressionOperator length()
Obtains the number of characters in the data string value expression.
Builds Symfoware equivalent to length(string_exp).
Symfoware: CHAR_LENGTH(string_exp)

Returns:
the defined expression operator.

charLength

protected static ExpressionOperator charLength()
Obtains the number of characters in the data string value expression.
Builds Symfoware equivalent to length(string_exp).
Symfoware: CHAR_LENGTH(string_exp)

Returns:
the defined expression operator.

locate

protected static ExpressionOperator locate()
Evaluates the location of the "tofind" text within the string_exp text.
Builds Symfoware equivalent to locate(string_exp, tofind).
Symfoware: POSITION(tofind IN string_exp)

Returns:
the defined expression operator.

locate2

protected static ExpressionOperator locate2()
Evaluates the location of the "tofind" text within the "string_exp" text, starting from the given start position.
Builds Symfoware equivalent to locate(string_exp, tofind, startpos).
Symfoware: LOCATE(tofind IN string_exp, startpos)

Returns:
the defined expression operator.

logOperator

protected static ExpressionOperator logOperator()
Returns the log10 operator.
Builds Symfoware equivalent to LOG(x).
Symfoware: (LN(x)/LN(10))

Returns:
the defined expression operator.

leftTrim

protected static ExpressionOperator leftTrim()
Returns the string left trimmed for white space.
Builds Symfoware equivalent to LTRIM(string_exp).
Symfoware: TRIM(LEADING FROM string_exp)

Returns:
the defined expression operator.

leftTrim2

protected static ExpressionOperator leftTrim2()
Returns the string left trimmed for white space.
Builds Symfoware equivalent to LTRIM(string_exp, character).
Symfoware: TRIM(LEADING character FROM string_exp)

Returns:
the defined expression operator.

mod

protected static ExpressionOperator mod()
Returns the remainder of a division.
Builds Symfoware equivalent to Oracle's MOD(x, y).
Note that it returns x when y is 0, and the sign of the remainder is taken from x. Symfoware: CASE WHEN y = 0 THEN x ELSE (x - y * TRUNC( x / y )) END

Returns:
the defined expression operator.

rightTrim

protected static ExpressionOperator rightTrim()
Returns the string right trimmed for white space.
Builds Symfoware equivalent to RTRIM(character).
Symfoware: TRIM(TRAILING FROM string_exp)

Returns:
the defined expression operator.

rightTrim2

protected static ExpressionOperator rightTrim2()
Returns the string right trimmed for white space.
Builds Symfoware equivalent to RTRIM(string_exp, character).
Symfoware: TRIM(TRAILING character FROM string_exp)

Returns:
the defined expression operator.

substring

protected static ExpressionOperator substring()
Gets the substring of source bounded by start location to end location.
Builds Symfoware equivalent to SUBSTRING(string_exp, startpos, length).
Symfoware: SUBSTRING(string_exp FROM startpos FOR length)

Returns:
the defined expression operator.

singleArgumentSubstring

protected static ExpressionOperator singleArgumentSubstring()
Gets the substring of a string starting from the specified start position.
Builds Symfoware equivalent to SUBSTRING(string_exp, startpos).
Symfoware: SUBSTRING(string_exp FROM startpos)

Returns:
the defined expression operator.

toNumber

protected static ExpressionOperator toNumber()
Returns the number converted from the string.
Builds Symfoware equivalent to ToNumber(string_exp).
Symfoware: CAST(string_exp AS SMALLINT)

Returns:
the defined expression operator.

instring

protected static ExpressionOperator instring()
Evaluates the location of the "tofind" text within the string_exp text.
Builds Symfoware equivalent to Instring(string_exp, tofind).
Symfoware: POSITION(tofind In string_exp)

Returns:
the defined expression operator.

monthsBetween

protected static ExpressionOperator monthsBetween()
Returns the decimal number of months between the two dates.
Builds Symfoware equivalent to monthsBetween(Date, Date).
Symfoware: SPAN_DATE(Date, Date, 'MONTH')

Returns:
the defined expression operator.

roundDate

protected static ExpressionOperator roundDate()
Returns the date rounded to the year, month or day.
Builds Symfoware equivalent to ROUNDDATE(Date, rounded).
Symfoware: ROUND_DATE(Date, rounded)

Returns:
the defined expression operator.

toDate

protected static ExpressionOperator toDate()
Converts the character value expression of the conversion source to the DATE type in accordance.
Builds Symfoware equivalent to toDate(Date, format).
Symfoware: CNV_DATE(Date, 'YYYY-MM-DD')

Returns:
the defined expression operator.

addDate

protected static ExpressionOperator addDate()
Adds to a date the specified addition number as the specified interval unit and returns the resulting date.
Builds Symfoware equivalent to addDate(unit, number).
Symfoware: ADD_DATE(date, number, unit)

Returns:
the defined expression operator.

truncateDate

protected static ExpressionOperator truncateDate()
Truncates a date by using the truncating unit.
Builds Symfoware equivalent to truncateDate(date, unit).
Symfoware: TRUNC_DATE(date, unit)

Returns:
the defined expression operator.

nvl

protected static ExpressionOperator nvl()
Substitute a value when a null value is encountered.
Builds Symfoware equivalent to NVL(string, replace_with).
Symfoware: COALESCE(string, replace_with)

Returns:
the defined expression operator.

greatest

protected static ExpressionOperator greatest()
Returns the greatest of two values.
Builds Symfoware equivalent to GREATEST(x, y).
Symfoware: CASE WHEN x >= y THEN x ELSE y END

Returns:
the defined expression operator.

least

protected static ExpressionOperator least()
Returns the smallest of two values.
Builds Symfoware equivalent to LEAST(x, y).
Symfoware: CASE WHEN x <= y THEN x ELSE y END

Returns:
the defined expression operator.

computeMaxRowsForSQL

public int computeMaxRowsForSQL(int firstResultIndex,
                                int maxResults)
Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL. These limits tend to be used in two ways.
 1. MaxRows is the index of the last row to be returned (like JDBC
 maxResults)
 2. MaxRows is the number of rows to be returned
 
Symfoware uses case #2 and therefore the maxResults has to be altered based on the firstResultIndex.

Overrides:
computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

buildSelectQueryForSequenceObject

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

Overrides:
buildSelectQueryForSequenceObject in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
seqName - known by Symfoware to be a defined sequence
size - size of sequence
Returns:
ValueReadQuery class to perform a read of a single data value.

buildCreateIndex

public java.lang.String buildCreateIndex(java.lang.String fullTableName,
                                         java.lang.String indexName,
                                         java.lang.String qualifier,
                                         boolean isUnique,
                                         java.lang.String... columnNames)
Return the CREATE INDEX string for this platform.

Overrides:
buildCreateIndex in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
fullTableName - qualified name of the table the index is to be created on
indexName - name of the index
qualifier - qualifier to construct qualified name of index if needed
isUnique - Indicates whether uniqe index is created
columnNames - one or more columns the index is created for

buildDropIndex

public java.lang.String buildDropIndex(java.lang.String fullTableName,
                                       java.lang.String indexName,
                                       java.lang.String qualifier)
Return the DROP INDEX string for this platform.

Overrides:
buildDropIndex in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
fullTableName - qualified name of the table the index is to be created on
indexName - name of the index
qualifier - qualifier to construct qualified name of index if needed

getCreateTempTableSqlPrefix

public java.lang.String getCreateTempTableSqlPrefix()
Returns the beginning of the SQL string to create a temporary table.

Overrides:
getCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
See Also:
shouldAlwaysUseTempStorageForModifyAll()

getCreateTempTableSqlSuffix

protected java.lang.String getCreateTempTableSqlSuffix()
Returns the ending of the SQL string to create a temporary table.
Symfoware V10 requires table space name and number of concurrent users.
Maybe this will be implemented in the future, for now it invokes the super class's method.

Overrides:
getCreateTempTableSqlSuffix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getDefaultSequenceTableName

public java.lang.String getDefaultSequenceTableName()
Returns the table name used by TableSequence by default. Symfoware does not allow reserved keyword 'SEQUENCE' as table name, so returns "SEQUENCE" (with double-quotes) instead.

Overrides:
getDefaultSequenceTableName in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getIndexNamePrefix

public java.lang.String getIndexNamePrefix(boolean isUniqueSetOnField)
Used to allow platforms to define their own index prefixes

Overrides:
getIndexNamePrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
isUniqueField -
Returns:

getInOutputProcedureToken

public java.lang.String getInOutputProcedureToken()
This method is used to print the output parameter token when stored procedures are called.

Overrides:
getInOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getInputProcedureToken

public java.lang.String getInputProcedureToken()
Used for stored procedure creation: Prefix for INPUT parameters.

Overrides:
getInputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getMaxFieldNameSize

public int getMaxFieldNameSize()
Returns the maximum number of single byte characters that can be used in a field name on this platform, assuming DEFAULT_DSI_NAME=CODE is specified in Symfoware's operating environment file for the system (see Symfoware manual).

Overrides:
getMaxFieldNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureAsString

public java.lang.String getProcedureAsString()
Symfoware does not use the AS token.

Overrides:
getProcedureAsString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureCallHeader

public java.lang.String getProcedureCallHeader()
Used for stored procedure calls.

Overrides:
getProcedureCallHeader in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureCallTail

public java.lang.String getProcedureCallTail()
Used for stored procedure calls.

Overrides:
getProcedureCallTail in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureBeginString

public java.lang.String getProcedureBeginString()
Used for stored procedure definitions.

Overrides:
getProcedureBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getProcedureEndString

public java.lang.String getProcedureEndString()
Used for stored procedure definitions.

Overrides:
getProcedureEndString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getSelectForUpdateString

public java.lang.String getSelectForUpdateString()
Symfoware supports "for update" for row locking.

Overrides:
getSelectForUpdateString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
the string of "for update".

getTimestampQuery

public ValueReadQuery getTimestampQuery()
This method returns the query to select the timestamp from the database.

Specified by:
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

minimumTimeIncrement

public long minimumTimeIncrement()
INTERNAL: Returns the minimum time increment supported by the platform.

Overrides:
minimumTimeIncrement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

printSQLSelectStatement

public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
                                    org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
                                    org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
Print the pagination SQL using Symfoware syntax " WITH OPTION LIMIT ()". There is no equivalent to 'OFFSET'.
Even though most performance benefit comes from including the offset in the SQL statement, for this platform the benefit of including LIMIT is that it allows pagination with result sets with scrollable cursors too (which the Symfoware JDBC driver's setMaxRows method does not support).

Overrides:
printSQLSelectStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

requiresProcedureBrackets

public boolean requiresProcedureBrackets()
Used for stored procedure creation: Symfoware needs brackets around arguments declaration even if no arguments exist, and so returns true.

Overrides:
requiresProcedureBrackets in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

requiresUniqueConstraintCreationOnTableCreate

public boolean requiresUniqueConstraintCreationOnTableCreate()
Used for table creation. Symfoware does not support the ALTER TABLE syntax to add/drop unique constraints, but it does allow declaration of (single and multi-column) unique constraints as part of the CREATE TABLE statement.

Overrides:
requiresUniqueConstraintCreationOnTableCreate in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
whether unique constraints should be declared as part of the CREATE TABLE statement instead of in separate ALTER TABLE ADD/DROP statements.

retrieveFirstPrimaryKeyOrOne

public void retrieveFirstPrimaryKeyOrOne(ReportQuery subselect)
INTERNAL: Used by Exists queries because they just need to select a single row. In most databases, we will select one of the primary key fields. On Syfoware, there are situations where the key cannot be used. See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=303396

Overrides:
retrieveFirstPrimaryKeyOrOne in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
subselect -
See Also:
SymfowarePlatform

shouldAlwaysUseTempStorageForModifyAll

public boolean shouldAlwaysUseTempStorageForModifyAll()
Symfoware does not support the default syntax generated for update-all and delete-all queries as they can include the same table in the FROM clause of the main and the sub-queries. However, the alternative of using global temporary tables leads to table locking issues, so returns false to prevent the use of global temporary tables.

Overrides:
shouldAlwaysUseTempStorageForModifyAll in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldBindLiterals

public boolean shouldBindLiterals()
Allows platform to choose whether to bind literals in SQL statements or not.
Literal binding is enabled for Symfoware in general. As a number of functions and operators have restrictions on the use of input parameters, it is disabled for those.

Overrides:
shouldBindLiterals in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
See Also:
isDynamicSQLRequiredForFunctions()

shouldCreateIndicesForPrimaryKeys

public boolean shouldCreateIndicesForPrimaryKeys()
Used for table creation. Symfoware needs an index to be created explicitly for columns with a primary key constraint.

Overrides:
shouldCreateIndicesForPrimaryKeys in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
true: indices should be created during table generation

shouldCreateIndicesOnUniqueKeys

public boolean shouldCreateIndicesOnUniqueKeys()
Used for table creation. Symfoware needs an index to be created explicitly for columns with a unique constraint.

Overrides:
shouldCreateIndicesOnUniqueKeys in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
true: indices should be created during table generation

shouldPrintInputTokenAtStart

public boolean shouldPrintInputTokenAtStart()
Used for stored procedure creation: Some platforms want to print prefix for INPUT arguments BEFORE NAME. If wanted, override and return true.

Overrides:
shouldPrintInputTokenAtStart in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintOutputTokenBeforeType

public boolean shouldPrintOutputTokenBeforeType()
This is required in the construction of the stored procedures with output parameters

Overrides:
shouldPrintOutputTokenBeforeType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintOutputTokenAtStart

public boolean shouldPrintOutputTokenAtStart()
This is required in the construction of the stored procedures with output parameters

Overrides:
shouldPrintOutputTokenAtStart in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintStoredProcedureArgumentNameInCall

public boolean shouldPrintStoredProcedureArgumentNameInCall()
Symfoware stored procedure calls do not require the argument name be printed in the call string.
E.g. call MyStoredProc(?) instead of call MyStoredProc(myvariable = ?)

Overrides:
shouldPrintStoredProcedureArgumentNameInCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

shouldPrintStoredProcedureVariablesAfterBeginString

public boolean shouldPrintStoredProcedureVariablesAfterBeginString()
Used for stored procedure creation: Symfoware declares variables AFTER the procedure body's BEGIN string.

Overrides:
shouldPrintStoredProcedureVariablesAfterBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsANSIInnerJoinSyntax

public boolean supportsANSIInnerJoinSyntax()
Indicates whether the ANSI syntax for inner joins (e.g. SELECT FROM t1 JOIN t2 ON t1.pk = t2.fk) is supported by this platform. Symfoware does not.

Overrides:
supportsANSIInnerJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsForeignKeyConstraints

public boolean supportsForeignKeyConstraints()
Symfoware does not support foreign key constraint syntax, so returns false.

Overrides:
supportsForeignKeyConstraints in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsGlobalTempTables

public boolean supportsGlobalTempTables()
Indicates whether the platform supports global temporary tables. Although Symfoware does, it leads to table locking issues when used from EclipseLink.

Overrides:
supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
See Also:
shouldAlwaysUseTempStorageForModifyAll()

supportsIndividualTableLocking

public boolean supportsIndividualTableLocking()
Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.
Symfoware platform currently only supports FOR UPDATE locking, which cannot be applied to queries that select from multiple tables. Use of other locking strategies (LOCK_MODE) are yet to be explored.

Overrides:
supportsIndividualTableLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsLockingQueriesWithMultipleTables

public boolean supportsLockingQueriesWithMultipleTables()
Indicates whether locking clause could be applied to the query that has more than one table.
Symfoware platform currently only supports FOR UPDATE locking, which cannot be applied to queries that select from multiple tables. Use of other locking strategies (LOCK_MODE) are yet to be explored.

Overrides:
supportsLockingQueriesWithMultipleTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsSequenceObjects

public boolean supportsSequenceObjects()
Indicates whether the platform supports sequence objects.
Symfoware does through global sequence objects.

Overrides:
supportsSequenceObjects in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsStoredFunctions

public boolean supportsStoredFunctions()
Indicates whether the platform supports stored functions.
Although Symfoware supports some stored functions as function routines, their functionality is incompatible with the one EclipseLink provides. So, return false;

Overrides:
supportsStoredFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

supportsUniqueKeyConstraints

public boolean supportsUniqueKeyConstraints()
Symfoware supports unique key constraints, so returns true.
Do note that unique constraints cannot be added/removed using "ALTER TABLE ADD/DROP CONSTRAINT" syntax.

Overrides:
supportsUniqueKeyConstraints in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
See Also:
requiresUniqueConstraintCreationOnTableCreate()

wasFailureCommunicationBased

public boolean wasFailureCommunicationBased(java.sql.SQLException exception,
                                            java.sql.Connection connection,
                                            org.eclipse.persistence.internal.sessions.AbstractSession sessionForProfile)
Fail-over is not implemented on platform. This method returns false no matter what caused the failure.

Overrides:
wasFailureCommunicationBased in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

EclipseLink 2.3.2, build 'v20111125-r10461' API Reference