Class SymfowarePlatform
- java.lang.Object
-
- org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
- org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
- org.eclipse.persistence.platform.database.DatabasePlatform
-
- org.eclipse.persistence.platform.database.SymfowarePlatform
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>
,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: 288715Developed on Symfoware Server V10
Initial SRG Passes on Symfoware Server V10
Feature Testing
----------------------- DDL Generation - Succeeds
- Outer Join - Succeeds
- Subquery - Succeeds with Limitations
- Stored Procedure Calls - Succeeds
- Stored Procedure Generation - Succeeds
- Native Sequences/Identifier fields - Succeeds
- JPA Bulk Update/Delete - Succeeds with Limitations
- Batch Reading - Succeeds
- Batch Writing - Succeeds
- Pessimistic Locking - Succeeds with Limitations
- First Result/Limit - Succeeds with Limitations
- Expression Framework - Succeeds with Limitations
- Delimiters - Succeeds
- Auto Detection - Succeeds
Limitations
----------------- Reserved SQL keywords cannot be used as table, column or sequence names. Use a different name, or enclose the name in double quotes. For example: @Column(name="\"LANGUAGE\"")
- Spaces cannot be used in table, column or sequence names. (bug 304906)
- Input parameters cannot be used as first two arguments to the LOCATE function at the same time. (bug 304897)
- The first argument to the SUBSTRING function cannot be an input parameter. (bug 304897)
- Input parameters cannot be used as adjacent arguments to the CONCAT function. Concatenate the values in Java code first and pass the result to the query instead. (bug 304897)
- Input parameters cannot be used at both sides of an operand at the same time in an SQL statement (e.g. '? * ?'). Perform the operation in Java code first and pass the result to the query instead.
- Identity fields cannot be used. When primary key generation type IDENTITY is specified, a database sequence will be used instead.
- Pessimistic Locking adds 'FOR UPDATE' to the SELECT statement, and cannot be used with queries that use DISTINCT. (bug 304903)
- Pessimistic Locking cannot be used with queries that select from multiple tables. (bug 304903)
- The LockNoWait option of Pessimistic Locking cannot be used; it is ignored when specified (i.e. only 'FOR UPDATE' is added to the SELECT statement).
- Query timeout cannot be used; the timeout value is silently ignored. (bug 304905)
- Bulk update and delete operations that require multiple tables to be accessed cannot be used (e.g. bulk operation on an entity that is part of an inheritance hierarchy, UpdateAll and DeleteAll queries). (See bug 298193).
- Dropping of tables, sequences and procedures while the database connection is still open can fail due to unreleased locks. Shut down the Java process that executed the create operation before performing the drop operation, or have the create operation use an unpooled connection that is closed after use (GlassFish's deploy-time table generation function uses an unpooled connection).
- The standard deviation (STDDEV) and variance (VARIANCE) functions cannot be used. (bug 304909)
- '= NULL' and '<> NULL' cannot be used for null comparisons in the WHERE clause. Use 'IS (NOT) NULL' instead.
- A scrollable cursor policy of CONCUR_UPDATABLE mode cannot be used with queries that select from multiple tables.
- Columns and literals of different type may need casting to allow them to be compared or assigned. (bug 372178) For example: 'SELECT ... WHERE CAST(PHONE_ORDER_VARCHAR AS INTEGER) BETWEEN 0 AND 1'
- Subqueries with joins to the outer query are not supported. (see rfe 298193)
- Stored functions are not supported. (bug 342409)
- Using subquery in select list for query specification or single-row SELECT statement is not allowed. (bug 372172)
- The CascadeOnDelete doesn't work on a relation where CascadeType.Remove or CascadeType.All is specified. (bug 342413)
- A subquery cannot be specified on both sides of a comparison predicate or a quantified predicate. (bug 378313)
- A base table name to be updated cannot be identical to table name in from clause in query or subquery specification (bug 381302)
Additional Notes
----------------- When using DDL generation, indices are automatically generated for primary and unique keys.
- The MOD(x, y) function is executed as 'CASE WHEN y = 0 THEN x ELSE (x - y * TRUNC( x / y )) END' on Symfoware database, which gives the same result as the MOD function on Oracle database. Input parameters cannot be used for both its arguments at the same time. In such case, calculate the modulus in Java code first and pass the result to the query instead.
- When input parameters are used as arguments to the TRIM function, they are substituted with their values before the SQL statement is sent to the JDBC driver.
- When an input parameter is used as argument to the UPPER, LOWER or LENGTH functions, it is substituted with its value before the SQL statement is sent to the JDBC driver.
- Since:
- EclipseLink 2.1
- Author:
- Dies Koper, Wu Jie
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
-
-
Constructor Summary
Constructors Constructor Description SymfowarePlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.ValueReadQuery
buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
Produce a DataReadQuery which updates(!) the sequence number in the DB and returns it.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.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 prefixesjava.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.boolean
isDynamicSQLRequiredForFunctions()
Symfoware does not support the use of multiple parameters in certain functions.
This allows statements to disable binding only in these cases.boolean
isForUpdateCompatibleWithDistinct()
Indicates whether SELECT DISTINCT ...boolean
isSymfoware()
Identifies this database platform as Symfoware's.long
minimumTimeIncrement()
INTERNAL: Returns the minimum time increment supported by the platform.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 ( <max>)".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.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.
Literal binding is enabled for Symfoware in general.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 parametersboolean
shouldPrintOutputTokenBeforeType()
This is required in the construction of the stored procedures with output parametersboolean
shouldPrintStoredProcedureArgumentNameInCall()
Symfoware stored procedure calls do not require the argument name be printed in the call string.
E.g.boolean
shouldPrintStoredProcedureVariablesAfterBeginString()
Used for stored procedure creation: Symfoware declares variables AFTER the procedure body's BEGIN string.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.
Symfoware platform currently only supports FOR UPDATE locking, which cannot be applied to queries that select from multiple tables.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.boolean
supportsSequenceObjects()
Indicates whether the platform supports sequence objects.
Symfoware does through global sequence objects.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.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.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, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, 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, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseJDBCOuterJoinSyntax, shouldUseRownumFiltering, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsIndexes, supportsLocalTempTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsIdentity, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence
-
-
-
-
Method Detail
-
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 classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
isSymfoware
public boolean isSymfoware()
Identifies this database platform as Symfoware's.- Specified by:
isSymfoware
in interfaceorg.eclipse.persistence.internal.databaseaccess.Platform
- Overrides:
isSymfoware
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- See Also:
MySQLPlatform
-
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 classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
- Parameters:
seqName
- known by Symfoware to be a defined sequencesize
- 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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
fullTableName
- qualified name of the table the index is to be created onindexName
- name of the indexqualifier
- qualifier to construct qualified name of index if neededisUnique
- Indicates whether uniqe index is createdcolumnNames
- 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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
fullTableName
- qualified name of the table the index is to be created onindexName
- name of the indexqualifier
- 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.- See Also:
shouldAlwaysUseTempStorageForModifyAll()
-
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 classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
isUniqueSetOnField
-- 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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getInputProcedureToken
public java.lang.String getInputProcedureToken()
Used for stored procedure creation: Prefix for INPUT parameters.- Overrides:
getInputProcedureToken
in classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureAsString
public java.lang.String getProcedureAsString()
Symfoware does not use the AS token.- Overrides:
getProcedureAsString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureCallHeader
public java.lang.String getProcedureCallHeader()
Used for stored procedure calls.- Overrides:
getProcedureCallHeader
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureCallTail
public java.lang.String getProcedureCallTail()
Used for stored procedure calls.- Overrides:
getProcedureCallTail
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureBeginString
public java.lang.String getProcedureBeginString()
Used for stored procedure definitions.- Overrides:
getProcedureBeginString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureEndString
public java.lang.String getProcedureEndString()
Used for stored procedure definitions.- Overrides:
getProcedureEndString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getSelectForUpdateString
public java.lang.String getSelectForUpdateString()
Symfoware supports "for update" for row locking.- Overrides:
getSelectForUpdateString
in classorg.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 interfaceorg.eclipse.persistence.internal.databaseaccess.Platform
- Overrides:
getTimestampQuery
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
minimumTimeIncrement
public long minimumTimeIncrement()
INTERNAL: Returns the minimum time increment supported by the platform.- Overrides:
minimumTimeIncrement
in classorg.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 ( <max>)". 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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsForeignKeyConstraints
public boolean supportsForeignKeyConstraints()
Symfoware does not support foreign key constraint syntax, so returns false.- Overrides:
supportsForeignKeyConstraints
in classorg.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 classorg.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 classorg.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 classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
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 classorg.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 classorg.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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Returns:
- false
-
-