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

public Class SQLAnywherePlatform

extends SybasePlatform
Class Inheritance
Imports
java.io.IOException, .StringWriter, .Writer, java.util.Hashtable, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition, org.eclipse.persistence.internal.helper.DatabaseTable, org.eclipse.persistence.queries.ValueReadQuery

Provides SQL Anywhere specific behaviour.
Author
Markus KARG ([email protected])

Field Summary

Inherited from org.eclipse.persistence.platform.database.SybasePlatform:
typeStrings

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Hashtable<Class<?>, FieldTypeDefinition>
buildFieldTypes()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.buildFieldTypes.

Return the mapping of class types to database types for the schema framework.
public ValueReadQuery
public static ExpressionOperator
public static ExpressionOperator
public static ExpressionOperator
public static ExpressionOperator
public static ExpressionOperator
public String
public String
public String
protected String
public String
getCreationOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getCreationOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform.
public String
getInOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.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.platform.database.SybasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
public String
getOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called
public String
public String
public String
public String
public String
public String
public DatabaseTable
getTempTableForTable(DatabaseTable
is original table for which temp table is created.
table
)

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getTempTableForTable.

Used for sp calls.
protected void
public boolean
public boolean
public void
printFieldIdentityClause(Writer writer)

Overrides org.eclipse.persistence.platform.database.SybasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer.
public void
printFieldNullClause(Writer writer)

Overrides org.eclipse.persistence.platform.database.SybasePlatform.printFieldNullClause.

Append the receiver's field 'NULL' constraint clause to a writer.
public boolean
requiresProcedureBrackets()

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

Used for stored procedure creation: Some platforms need brackets around arguments declaration even if no arguments exist.
public boolean
public boolean
requiresTypeNameToRegisterOutputParameter()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.requiresTypeNameToRegisterOutputParameter.

INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
public boolean
shouldPrintInOutputTokenBeforeType()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.shouldPrintInOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters
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.platform.database.SybasePlatform.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.

INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g. EXECUTE PROCEDURE MyStoredProc(myvariable = ?)
public boolean
shouldPrintStoredProcedureVariablesAfterBeginString()

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

Used for stored procedure creation: Some platforms declare variables AFTER the procedure body's BEGIN string.
public boolean
supportsDeleteOnCascade()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.supportsDeleteOnCascade.

SQL Anywhere does support cascade on delete, unlike Sybase.
public boolean
supportsIdentity()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity.
public boolean
supportsLocalTempTables()

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

INTERNAL: Indicates whether the platform supports local temporary tables.
public boolean
Inherited from org.eclipse.persistence.platform.database.SybasePlatform:
appendByteArrayappendCalendarappendDateappendSybaseCalendarappendSybaseTimestampappendTimeappendTimestampextractOperatorgetCreationInOutputProcedureTokengetJDBCTypegetJdbcTypeNamegetNativeTableInfogetProcedureCallTailgetSelectForUpdateStringgetTimestampQuerygetTypeStringsinitializeConnectionDatainitializeTypeStringsisOutputAllowWithResultSetmaximumNumericValuesminimumNumericValuesmodOperatoroperatorOuterJoinregisterOutputParameterregisterOutputParameterrequiresProcedureCallOuputTokenshouldPrintLockingClauseAfterWhereClauseshouldUseJDBCOuterJoinSyntaxsingleArgumentSubstringOperatorsupportsGlobalTempTablessybaseAddMonthsOperatorsybaseInStringOperatorsybaseLocate2OperatorsybaseLocateOperatorsybaseToCharOperatorsybaseToCharWithFormatOperatorsybaseToDateOperatorsybaseToDateToStringOperatorsybaseToNumberOperatortrim2OperatortrimOperatoruseJDBCStoredProcedureSyntaxwriteUpdateOriginalFromTempTableSql

Constructor Detail

SQLAnywherePlatformback to summary
public SQLAnywherePlatform()

Method Detail

buildFieldTypesback to summary
protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.buildFieldTypes.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.buildFieldTypes.

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

Annotations
@Override
buildSelectQueryForIdentityback to summary
public ValueReadQuery buildSelectQueryForIdentity()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.buildSelectQueryForIdentity.

INTERNAL: Build the identity query for native sequencing.

Annotations
@Override
createConcatOperatorback to summary
public static ExpressionOperator createConcatOperator()
createCurrentDateOperatorback to summary
public static ExpressionOperator createCurrentDateOperator()
createCurrentTimeOperatorback to summary
public static ExpressionOperator createCurrentTimeOperator()
createLocate2Operatorback to summary
public static ExpressionOperator createLocate2Operator()
createLocateOperatorback to summary
public static ExpressionOperator createLocateOperator()
getBatchBeginStringback to summary
public String getBatchBeginString()

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

Used for batch writing and sp defs.

Annotations
@Override
getBatchDelimiterStringback to summary
public String getBatchDelimiterString()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getBatchDelimiterString.

Used for batch writing and sp defs.

Annotations
@Override
getBatchEndStringback to summary
public String getBatchEndString()

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

Used for batch writing and sp defs.

Annotations
@Override
getCreateTempTableSqlPrefixback to summary
protected String getCreateTempTableSqlPrefix()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getCreateTempTableSqlPrefix.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.getCreateTempTableSqlPrefix.

INTERNAL:

Annotations
@Override
getCreationOutputProcedureTokenback to summary
public String getCreationOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getCreationOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCreationOutputProcedureToken.

This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.

Annotations
@Override
getInOutputProcedureTokenback to summary
public String getInOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getInOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getInOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called

Annotations
@Override
getInputProcedureTokenback to summary
public String getInputProcedureToken()

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

Used for stored procedure creation: Prefix for INPUT parameters. Not required on most platforms.

Annotations
@Override
getMaxFieldNameSizeback to summary
public int getMaxFieldNameSize()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getMaxFieldNameSize.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.getMaxFieldNameSize.

INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.

Annotations
@Override
getOutputProcedureTokenback to summary
public String getOutputProcedureToken()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getOutputProcedureToken.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getOutputProcedureToken.

This method is used to print the output parameter token when stored procedures are called

Annotations
@Override
getProcedureArgumentStringback to summary
public String getProcedureArgumentString()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getProcedureArgumentString.

Used for sp defs.

Annotations
@Override
getProcedureAsStringback to summary
public String getProcedureAsString()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureAsString.

Used for stored procedure defs.

Annotations
@Override
getProcedureBeginStringback to summary
public String getProcedureBeginString()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureBeginString.

Used for stored procedure defs.

Annotations
@Override
getProcedureCallHeaderback to summary
public String getProcedureCallHeader()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getProcedureCallHeader.

Used for sp calls.

Annotations
@Override
getProcedureEndStringback to summary
public String getProcedureEndString()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getProcedureEndString.

Used for stored procedure defs.

Annotations
@Override
getStoredProcedureParameterPrefixback to summary
public String getStoredProcedureParameterPrefix()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getStoredProcedureParameterPrefix.

Annotations
@Override
getTempTableForTableback to summary
public DatabaseTable getTempTableForTable(DatabaseTable table)

Overrides org.eclipse.persistence.platform.database.SybasePlatform.getTempTableForTable.

Used for sp calls.

Parameters
table:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

is original table for which temp table is created.

Returns:DatabaseTable

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getTempTableForTable.

temporary table

Annotations
@Override
initializePlatformOperatorsback to summary
protected void initializePlatformOperators()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.initializePlatformOperators.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.initializePlatformOperators.

Initialize any platform-specific operators

Annotations
@Override
isSQLAnywhereback to summary
public boolean isSQLAnywhere()

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

Implements org.eclipse.persistence.internal.databaseaccess.Platform.isSQLAnywhere.

Annotations
@Override
isSybaseback to summary
public boolean isSybase()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.isSybase.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.isSybase.

Annotations
@Override
printFieldIdentityClauseback to summary
public void printFieldIdentityClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.platform.database.SybasePlatform.printFieldIdentityClause.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.printFieldIdentityClause.

Append the receiver's field 'identity' constraint clause to a writer.

Annotations
@Override
printFieldNullClauseback to summary
public void printFieldNullClause(Writer writer) throws ValidationException

Overrides org.eclipse.persistence.platform.database.SybasePlatform.printFieldNullClause.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.printFieldNullClause.

Append the receiver's field 'NULL' constraint clause to a writer.

Annotations
@Override
requiresProcedureBracketsback to summary
public boolean requiresProcedureBrackets()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.requiresProcedureBrackets.

Used for stored procedure creation: Some platforms need brackets around arguments declaration even if no arguments exist. Those platform will override this and return true. All other platforms will omit the brackets in this case.

Annotations
@Override
requiresProcedureCallBracketsback to summary
public boolean requiresProcedureCallBrackets()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.requiresProcedureCallBrackets.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.requiresProcedureCallBrackets.

USed for sp calls.

Annotations
@Override
requiresTypeNameToRegisterOutputParameterback to summary
public boolean requiresTypeNameToRegisterOutputParameter()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.requiresTypeNameToRegisterOutputParameter.

INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.

Annotations
@Override
shouldPrintInOutputTokenBeforeTypeback to summary
public boolean shouldPrintInOutputTokenBeforeType()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.shouldPrintInOutputTokenBeforeType.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintInOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters

Annotations
@Override
shouldPrintInputTokenAtStartback to summary
public boolean shouldPrintInputTokenAtStart()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintInputTokenAtStart.

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

Annotations
@Override
shouldPrintOutputTokenAtStartback to summary
public boolean shouldPrintOutputTokenAtStart()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintOutputTokenAtStart.

This is required in the construction of the stored procedures with output parameters

Annotations
@Override
shouldPrintOutputTokenBeforeTypeback to summary
public boolean shouldPrintOutputTokenBeforeType()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.shouldPrintOutputTokenBeforeType.

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintOutputTokenBeforeType.

This is required in the construction of the stored procedures with output parameters

Annotations
@Override
shouldPrintStoredProcedureArgumentNameInCallback to summary
public boolean shouldPrintStoredProcedureArgumentNameInCall()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintStoredProcedureArgumentNameInCall.

INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g. EXECUTE PROCEDURE MyStoredProc(myvariable = ?)

Annotations
@Override
shouldPrintStoredProcedureVariablesAfterBeginStringback to summary
public boolean shouldPrintStoredProcedureVariablesAfterBeginString()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldPrintStoredProcedureVariablesAfterBeginString.

Used for stored procedure creation: Some platforms declare variables AFTER the procedure body's BEGIN string. These need to override and return true. All others will print the variable declaration BEFORE the body's BEGIN string.

Annotations
@Override
supportsDeleteOnCascadeback to summary
public boolean supportsDeleteOnCascade()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.supportsDeleteOnCascade.

SQL Anywhere does support cascade on delete, unlike Sybase.

Annotations
@Override
supportsIdentityback to summary
public boolean supportsIdentity()

Overrides org.eclipse.persistence.platform.database.SybasePlatform.supportsIdentity.

Doc from org.eclipse.persistence.platform.database.SybasePlatform.supportsIdentity.

INTERNAL: Indicates whether the platform supports identity. Sybase does through IDENTITY field types. This method is to be used *ONLY* by sequencing classes

Annotations
@Override
supportsLocalTempTablesback to summary
public boolean supportsLocalTempTables()

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

Doc from org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.supportsLocalTempTables.

INTERNAL: Indicates whether the platform supports local temporary tables. "Local" means that several threads may create temporary tables with the same name. Local temporary table is created in the beginning of UpdateAllQuery execution and dropped in the end of it. Override this method if the platform supports local temporary tables.

Annotations
@Override
supportsStoredFunctionsback to summary
public boolean supportsStoredFunctions()

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

Annotations
@Override