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

public Class SymfowarePlatform

extends DatabasePlatform
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, .Writer, java.sql.Connection, .SQLException, java.util.ArrayList, .Calendar, .Hashtable, .List, .Map, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.DatabaseCall, .FieldTypeDefinition, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter, .FunctionExpression, .SQLSelectStatement, org.eclipse.persistence.internal.helper.ClassConstants, .Helper, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.queries.ReportQuery, .ValueReadQuery

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

----------------
Authors
Dies Koper, Wu Jie
Since
EclipseLink 2.1

Field Summary

Inherited from org.eclipse.persistence.platform.database.DatabasePlatform:
DEFAULT_VARCHAR_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static ExpressionOperator

Returns:

the defined expression operator.
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.

public boolean
protected void
appendCalendar(Calendar calendar, Writer writer)

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

Write a Calendar in Symfoware specific format.
protected void
appendDate(Date date, Writer writer)

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

Appends a Date in Symfoware specific format.
protected void
appendTime(Time time, Writer writer)

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

Appends a Time in Symfoware specific format.
protected void
appendTimestamp(Timestamp timestamp, Writer writer)

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

Appends a TimeStamp in Symfoware specific format.
protected Map<String, Class<?>>

Returns:

the mappings.
buildClassTypes
()

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

Return the mapping of database types to class types for the schema framework.
public String
buildCreateIndex(String
qualified name of the table the index is to be created on
fullTableName
,
String
name of the index
indexName
,
String
qualifier to construct qualified name of index if needed
qualifier
,
boolean
Indicates whether uniqe index is created
isUnique
,
String...
one or more columns the index is created for
columnNames
)

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

Return the CREATE INDEX string for this platform.
public String
buildDropIndex(String
qualified name of the table the index is to be created on
fullTableName
,
String
name of the index
indexName
,
String
qualifier to construct qualified name of index if needed
qualifier
)

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

Return the DROP INDEX string for this platform.
protected Hashtable<Class<?>, FieldTypeDefinition>

Returns:

hashtable of Java types to FieldTypeDefinition instances containing Symfoware SQL types.
buildFieldTypes
()

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

Return the mapping of Java class types to database types for the schema framework.
public ValueReadQuery

Returns:

ValueReadQuery class to perform a read of a single data value.
buildSelectQueryForSequenceObject
(String
known by Symfoware to be a defined sequence
seqName
,
Integer
size of sequence
size
)

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

Produce a DataReadQuery which updates(!) the sequence number in the DB and returns it.
protected static ExpressionOperator

Returns:

the defined expression operator.
charLength
()

Obtains the number of characters in the data string value expression.

public int
computeMaxRowsForSQL(int firstResultIndex, int maxResults)

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

Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL.
public String
getCreateTempTableSqlPrefix()

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

Returns the beginning of the SQL string to create a temporary table.
protected String
getCreateTempTableSqlSuffix()

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

Returns the ending of the SQL string to create a temporary table.
public String
public String
getIndexNamePrefix(boolean isUniqueSetOnField)

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

Used to allow platforms to define their own index prefixes
public String
getInOutputProcedureToken()

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

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

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

Used for stored procedure creation: Prefix for INPUT parameters.
public int
getMaxFieldNameSize()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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).
public String
public String
public String
public String
public String
public String

Returns:

the string of "for update".
getSelectForUpdateString
()

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

Symfoware supports "for update" for row locking.
public ValueReadQuery
protected static ExpressionOperator

Returns:

the defined expression operator.
greatest
()

Returns the greatest of two values.

protected void
protected static ExpressionOperator

Returns:

the defined expression operator.
instring
()

Evaluates the location of the "tofind" text within the string_exp text.

public boolean
isDynamicSQLRequiredForFunctions()

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

Symfoware does not support the use of multiple parameters in certain functions.
public boolean
public boolean
protected static ExpressionOperator

Returns:

the defined expression operator.
least
()

Returns the smallest of two values.

protected static ExpressionOperator

Returns:

the defined expression operator.
leftTrim
()

Returns the string left trimmed for white space.

protected static ExpressionOperator

Returns:

the defined expression operator.
leftTrim2
()

Returns the string left trimmed for white space.

protected static ExpressionOperator

Returns:

the defined expression operator.
length
()

Obtains the number of characters in the data string value expression.

protected static ExpressionOperator

Returns:

the defined expression operator.
locate
()

Evaluates the location of the "tofind" text within the string_exp text.

protected static ExpressionOperator

Returns:

the defined expression operator.
locate2
()

Evaluates the location of the "tofind" text within the "string_exp" text, starting from the given start position.

protected static ExpressionOperator

Returns:

the defined expression operator.
logOperator
()

Returns the log10 operator.

public long
minimumTimeIncrement()

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

INTERNAL: Returns the minimum time increment supported by the platform.
protected static ExpressionOperator

Returns:

the defined expression operator.
mod
()

Returns the remainder of a division.

protected static ExpressionOperator

Returns:

the defined expression operator.
monthsBetween
()

Returns the decimal number of months between the two dates.

protected static ExpressionOperator

Returns:

the defined expression operator.
nvl
()

Substitute a value when a null value is encountered.

public void
printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement)

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

Print the pagination SQL using Symfoware syntax " WITH OPTION LIMIT ( <max>)".
public boolean
requiresProcedureBrackets()

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

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

Returns:

whether unique constraints should be declared as part of the CREATE TABLE statement instead of in separate ALTER TABLE ADD/DROP statements.
requiresUniqueConstraintCreationOnTableCreate
()

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

Used for table creation.
public void
retrieveFirstPrimaryKeyOrOne(ReportQuery subselect)

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

INTERNAL: Used by Exists queries because they just need to select a single row.
protected static ExpressionOperator

Returns:

the defined expression operator.
rightTrim
()

Returns the string right trimmed for white space.

protected static ExpressionOperator

Returns:

the defined expression operator.
rightTrim2
()

Returns the string right trimmed for white space.

protected static ExpressionOperator

Returns:

the defined expression operator.
roundDate
()

Returns the date rounded to the year, month or day.

public boolean
shouldAlwaysUseTempStorageForModifyAll()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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.
public boolean
shouldBindLiterals()

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

Allows platform to choose whether to bind literals in SQL statements or not.
public boolean

Returns:

true: indices should be created during table generation
shouldCreateIndicesForPrimaryKeys
()

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

Used for table creation.
public boolean

Returns:

true: indices should be created during table generation
shouldCreateIndicesOnUniqueKeys
()

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

Used for table creation.
public boolean
shouldPrintInputTokenAtStart()

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

Used for stored procedure creation: Some platforms want to print prefix for INPUT arguments BEFORE NAME.
public boolean
shouldPrintOutputTokenAtStart()

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

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

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

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

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

Symfoware stored procedure calls do not require the argument name be printed in the call string.
public boolean
shouldPrintStoredProcedureVariablesAfterBeginString()

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

Used for stored procedure creation: Symfoware declares variables AFTER the procedure body's BEGIN string.
protected static ExpressionOperator

Returns:

the defined expression operator.
singleArgumentSubstring
()

Gets the substring of a string starting from the specified start position.

protected static ExpressionOperator

Returns:

the defined expression operator.
substring
()

Gets the substring of source bounded by start location to end location.

public boolean
supportsANSIInnerJoinSyntax()

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.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.
public boolean
supportsForeignKeyConstraints()

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

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

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

Indicates whether the platform supports global temporary tables.
public boolean
supportsIndividualTableLocking()

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

Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.
public boolean
supportsLockingQueriesWithMultipleTables()

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

Indicates whether locking clause could be applied to the query that has more than one table.
public boolean
public boolean
public boolean
protected static ExpressionOperator

Returns:

the defined expression operator.
toDate
()

Converts the character value expression of the conversion source to the DATE type in accordance.

protected static ExpressionOperator

Returns:

the defined expression operator.
toNumber
()

Returns the number converted from the string.

protected static ExpressionOperator

Returns:

the defined expression operator.
truncateDate
()

Truncates a date by using the truncating unit.

public boolean

Returns:

false
wasFailureCommunicationBased
(SQLException exception, Connection connection, AbstractSession sessionForProfile)

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

Fail-over is not implemented on platform.