Module eclipselink

Class SQLAnywherePlatform

java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
All Implemented Interfaces:
Serializable, Cloneable, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>, org.eclipse.persistence.internal.databaseaccess.Platform, DDLPlatform

public class SQLAnywherePlatform extends SybasePlatform
Provides SQL Anywhere specific behaviour.
See Also:
Author:
Markus KARG (markus-karg@users.sourceforge.net)
  • Constructor Details

    • SQLAnywherePlatform

      public SQLAnywherePlatform()
  • Method Details

    • buildDatabaseTypes

      protected Map<Class<?>,FieldDefinition.DatabaseType> buildDatabaseTypes()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Return the mapping of class types to database types for the schema framework.
      Overrides:
      buildDatabaseTypes in class SybasePlatform
    • buildSelectQueryForIdentity

      public ValueReadQuery buildSelectQueryForIdentity()
      INTERNAL: Build the identity query for native sequencing.
      Overrides:
      buildSelectQueryForIdentity in class SybasePlatform
    • createCurrentDateOperator

      public static ExpressionOperator createCurrentDateOperator()
    • createCurrentTimeOperator

      public static ExpressionOperator createCurrentTimeOperator()
    • createLocate2Operator

      public static ExpressionOperator createLocate2Operator()
    • createConcatOperator

      public static ExpressionOperator createConcatOperator()
    • createLocateOperator

      public static ExpressionOperator createLocateOperator()
    • getCreateTempTableSqlPrefix

      protected String getCreateTempTableSqlPrefix()
      Description copied from class: SybasePlatform
      INTERNAL:
      Overrides:
      getCreateTempTableSqlPrefix in class SybasePlatform
    • getInputProcedureToken

      public String getInputProcedureToken()
      Used for stored procedure creation: Prefix for INPUT parameters. Not required on most platforms.
    • getInOutputProcedureToken

      public String getInOutputProcedureToken()
      Description copied from interface: DDLPlatform
      This method is used to print the output parameter token when stored procedures are called
      Specified by:
      getInOutputProcedureToken in interface DDLPlatform
      Overrides:
      getInOutputProcedureToken in class SybasePlatform
    • getCreationOutputProcedureToken

      public String getCreationOutputProcedureToken()
      Description copied from interface: DDLPlatform
      This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.
      Specified by:
      getCreationOutputProcedureToken in interface DDLPlatform
      Overrides:
      getCreationOutputProcedureToken in class SybasePlatform
    • getOutputProcedureToken

      public String getOutputProcedureToken()
      Description copied from interface: DDLPlatform
      This method is used to print the output parameter token when stored procedures are called
      Specified by:
      getOutputProcedureToken in interface DDLPlatform
      Overrides:
      getOutputProcedureToken in class SybasePlatform
    • getMaxFieldNameSize

      public int getMaxFieldNameSize()
      Description copied from class: SybasePlatform
      INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
      Specified by:
      getMaxFieldNameSize in interface DDLPlatform
      Overrides:
      getMaxFieldNameSize in class SybasePlatform
    • getProcedureArgumentString

      public String getProcedureArgumentString()
      Used for sp defs.
      Specified by:
      getProcedureArgumentString in interface DDLPlatform
      Overrides:
      getProcedureArgumentString in class SybasePlatform
    • getStoredProcedureParameterPrefix

      public String getStoredProcedureParameterPrefix()
      Overrides:
      getStoredProcedureParameterPrefix in class SybasePlatform
    • getProcedureAsString

      public String getProcedureAsString()
      Description copied from interface: DDLPlatform
      Used for stored procedure defs.
    • getProcedureBeginString

      public String getProcedureBeginString()
      Description copied from interface: DDLPlatform
      Used for stored procedure defs.
    • getProcedureEndString

      public String getProcedureEndString()
      Description copied from interface: DDLPlatform
      Used for stored procedure defs.
    • getBatchBeginString

      public String getBatchBeginString()
      Used for batch writing and sp defs.
    • getBatchEndString

      public String getBatchEndString()
      Used for batch writing and sp defs.
    • getBatchDelimiterString

      public String getBatchDelimiterString()
      Used for batch writing and sp defs.
      Specified by:
      getBatchDelimiterString in interface DDLPlatform
      Overrides:
      getBatchDelimiterString in class SybasePlatform
    • getProcedureCallHeader

      public String getProcedureCallHeader()
      Used for sp calls.
      Overrides:
      getProcedureCallHeader in class SybasePlatform
    • getTempTableForTable

      public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
      Used for sp calls.
      Overrides:
      getTempTableForTable in class SybasePlatform
      Parameters:
      table - is original table for which temp table is created.
      Returns:
      temporary table
    • initializePlatformOperators

      protected void initializePlatformOperators()
      Description copied from class: SybasePlatform
      Initialize any platform-specific operators
      Overrides:
      initializePlatformOperators in class SybasePlatform
    • isSQLAnywhere

      public boolean isSQLAnywhere()
      Specified by:
      isSQLAnywhere in interface org.eclipse.persistence.internal.databaseaccess.Platform
      Overrides:
      isSQLAnywhere in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • isSybase

      public boolean isSybase()
      Specified by:
      isSybase in interface org.eclipse.persistence.internal.databaseaccess.Platform
      Overrides:
      isSybase in class SybasePlatform
    • requiresProcedureBrackets

      public boolean requiresProcedureBrackets()
      Description copied from interface: DDLPlatform
      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.
    • requiresProcedureCallBrackets

      public boolean requiresProcedureCallBrackets()
      Description copied from class: SybasePlatform
      USed for sp calls.
      Overrides:
      requiresProcedureCallBrackets in class SybasePlatform
    • requiresTypeNameToRegisterOutputParameter

      public boolean requiresTypeNameToRegisterOutputParameter()
      INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
      Overrides:
      requiresTypeNameToRegisterOutputParameter in class SybasePlatform
    • printFieldIdentityClause

      public void printFieldIdentityClause(Writer writer) throws ValidationException
      Description copied from class: SybasePlatform
      Append the receiver's field 'identity' constraint clause to a writer.
      Specified by:
      printFieldIdentityClause in interface DDLPlatform
      Overrides:
      printFieldIdentityClause in class SybasePlatform
      Parameters:
      writer - the writer to append to
      Throws:
      ValidationException
    • printFieldNullClause

      public void printFieldNullClause(Writer writer) throws ValidationException
      Description copied from class: SybasePlatform
      Append the receiver's field 'NULL' constraint clause to a writer.
      Specified by:
      printFieldNullClause in interface DDLPlatform
      Overrides:
      printFieldNullClause in class SybasePlatform
      Parameters:
      writer - the writer to append to
      Throws:
      ValidationException
    • shouldPrintInputTokenAtStart

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

      public boolean shouldPrintInOutputTokenBeforeType()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      This is required in the construction of the stored procedures with output parameters
      Overrides:
      shouldPrintInOutputTokenBeforeType in class SybasePlatform
    • shouldPrintOutputTokenAtStart

      public boolean shouldPrintOutputTokenAtStart()
      Description copied from interface: DDLPlatform
      This is required in the construction of the stored procedures with output parameters
    • shouldPrintOutputTokenBeforeType

      public boolean shouldPrintOutputTokenBeforeType()
      Description copied from interface: DDLPlatform
      This is required in the construction of the stored procedures with output parameters
      Specified by:
      shouldPrintOutputTokenBeforeType in interface DDLPlatform
      Overrides:
      shouldPrintOutputTokenBeforeType in class SybasePlatform
    • shouldPrintStoredProcedureArgumentNameInCall

      public boolean shouldPrintStoredProcedureArgumentNameInCall()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g. EXECUTE PROCEDURE MyStoredProc(myvariable = ?)
      Overrides:
      shouldPrintStoredProcedureArgumentNameInCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • shouldPrintStoredProcedureVariablesAfterBeginString

      public boolean shouldPrintStoredProcedureVariablesAfterBeginString()
      Description copied from interface: DDLPlatform
      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.
    • supportsIdentity

      public boolean supportsIdentity()
      Description copied from class: SybasePlatform
      INTERNAL: Indicates whether the platform supports identity. Sybase does through IDENTITY field types. This method is to be used *ONLY* by sequencing classes
      Overrides:
      supportsIdentity in class SybasePlatform
    • supportsLocalTempTables

      public boolean supportsLocalTempTables()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      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.
      Overrides:
      supportsLocalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • supportsStoredFunctions

      public boolean supportsStoredFunctions()
    • supportsDeleteOnCascade

      public boolean supportsDeleteOnCascade()
      SQL Anywhere does support cascade on delete, unlike Sybase.
      Specified by:
      supportsDeleteOnCascade in interface DDLPlatform
      Overrides:
      supportsDeleteOnCascade in class SybasePlatform