Module eclipselink

Class SQLAnywherePlatform

  • All Implemented Interfaces:
    Serializable, Cloneable, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>, org.eclipse.persistence.internal.databaseaccess.Platform

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

      • Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

        batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
      • Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

        conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery, uuidQuery
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Hashtable<Class<?>,​org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> buildFieldTypes()
      Return the mapping of class types to database types for the schema framework.
      ValueReadQuery buildSelectQueryForIdentity()
      INTERNAL: Build the identity query for native sequencing.
      static ExpressionOperator createConcatOperator()  
      static ExpressionOperator createCurrentDateOperator()  
      static ExpressionOperator createCurrentTimeOperator()  
      static ExpressionOperator createLocate2Operator()  
      static ExpressionOperator createLocateOperator()  
      String getBatchBeginString()
      Used for batch writing and sp defs.
      String getBatchDelimiterString()
      Used for batch writing and sp defs.
      String getBatchEndString()
      Used for batch writing and sp defs.
      protected String getCreateTempTableSqlPrefix()
      INTERNAL:
      String getCreationOutputProcedureToken()
      This method is used to print the required output parameter token for the specific platform.
      String getInOutputProcedureToken()
      This method is used to print the output parameter token when stored procedures are called
      String getInputProcedureToken()
      Used for stored procedure creation: Prefix for INPUT parameters.
      int getMaxFieldNameSize()
      INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
      String getOutputProcedureToken()
      This method is used to print the output parameter token when stored procedures are called
      String getProcedureArgumentString()
      Used for sp defs.
      String getProcedureAsString()
      Used for stored procedure defs.
      String getProcedureBeginString()
      Used for stored procedure defs.
      String getProcedureCallHeader()
      Used for sp calls.
      String getProcedureEndString()
      Used for stored procedure defs.
      String getStoredProcedureParameterPrefix()  
      org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable​(org.eclipse.persistence.internal.helper.DatabaseTable table)
      Used for sp calls.
      protected void initializePlatformOperators()
      Initialize any platform-specific operators
      boolean isSQLAnywhere()  
      boolean isSybase()  
      void printFieldIdentityClause​(Writer writer)
      Append the receiver's field 'identity' constraint clause to a writer.
      void printFieldNullClause​(Writer writer)
      Append the receiver's field 'NULL' constraint clause to a writer.
      boolean requiresProcedureBrackets()
      Used for stored procedure creation: Some platforms need brackets around arguments declaration even if no arguments exist.
      boolean requiresProcedureCallBrackets()
      USed for sp calls.
      boolean requiresTypeNameToRegisterOutputParameter()
      INTERNAL: Indicates whether the version of CallableStatement.registerOutputParameter method that takes type name should be used.
      boolean shouldPrintInOutputTokenBeforeType()
      This is required in the construction of the stored procedures with output parameters
      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()
      INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g.
      boolean shouldPrintStoredProcedureVariablesAfterBeginString()
      Used for stored procedure creation: Some platforms declare variables AFTER the procedure body's BEGIN string.
      boolean supportsDeleteOnCascade()
      SQL Anywhere does support cascade on delete, unlike Sybase.
      boolean supportsIdentity()
      INTERNAL: Indicates whether the platform supports identity.
      boolean supportsLocalTempTables()
      INTERNAL: Indicates whether the platform supports local temporary tables.
      boolean supportsStoredFunctions()  
      • Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

        addBatch, addStructConverter, allowBindingForSelectClause, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkTableExists, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getJDBCOuterJoinString, getJDBCType, getJDBCTypeForSetNull, getJsonPlatform, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresTableInIndexDropDDL, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setNullFromDatabaseField, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldBindPartialParameters, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceBindAllParameters, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintOuterJoinInWhereClause, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix
      • Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

        addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle23, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLServer, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, setUUIDQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, supportsSequenceObjects, toString, usesPlatformDefaultSequence
      • Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.Platform

        connectionProperties
    • Constructor Detail

      • SQLAnywherePlatform

        public SQLAnywherePlatform()
    • Method Detail

      • buildFieldTypes

        protected Hashtable<Class<?>,​org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> buildFieldTypes()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Return the mapping of class types to database types for the schema framework.
        Overrides:
        buildFieldTypes in class SybasePlatform
      • createCurrentDateOperator

        public static ExpressionOperator createCurrentDateOperator()
      • createCurrentTimeOperator

        public static ExpressionOperator createCurrentTimeOperator()
      • getInputProcedureToken

        public String getInputProcedureToken()
        Used for stored procedure creation: Prefix for INPUT parameters. Not required on most platforms.
        Overrides:
        getInputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • getInOutputProcedureToken

        public String getInOutputProcedureToken()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        This method is used to print the output parameter token when stored procedures are called
        Overrides:
        getInOutputProcedureToken in class SybasePlatform
      • getCreationOutputProcedureToken

        public String getCreationOutputProcedureToken()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        This method is used to print the required output parameter token for the specific platform. Used when stored procedures are created.
        Overrides:
        getCreationOutputProcedureToken in class SybasePlatform
      • getOutputProcedureToken

        public String getOutputProcedureToken()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        This method is used to print the output parameter token when stored procedures are called
        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.
        Overrides:
        getMaxFieldNameSize in class SybasePlatform
      • getProcedureAsString

        public String getProcedureAsString()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Used for stored procedure defs.
        Overrides:
        getProcedureAsString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • getProcedureBeginString

        public String getProcedureBeginString()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Used for stored procedure defs.
        Overrides:
        getProcedureBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • getProcedureEndString

        public String getProcedureEndString()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Used for stored procedure defs.
        Overrides:
        getProcedureEndString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • getBatchBeginString

        public String getBatchBeginString()
        Used for batch writing and sp defs.
        Overrides:
        getBatchBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • getBatchEndString

        public String getBatchEndString()
        Used for batch writing and sp defs.
        Overrides:
        getBatchEndString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • 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
      • 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 class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        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.
        Overrides:
        requiresProcedureBrackets in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • 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
      • shouldPrintInputTokenAtStart

        public boolean shouldPrintInputTokenAtStart()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        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
      • 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 class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        This is required in the construction of the stored procedures with output parameters
        Overrides:
        shouldPrintOutputTokenAtStart in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • shouldPrintOutputTokenBeforeType

        public boolean shouldPrintOutputTokenBeforeType()
        Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        This is required in the construction of the stored procedures with output parameters
        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 class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        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.
        Overrides:
        shouldPrintStoredProcedureVariablesAfterBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • 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()
        Overrides:
        supportsStoredFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • supportsDeleteOnCascade

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