Class HANAPlatform

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.HANAPlatform
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 final class HANAPlatform extends DatabasePlatform
Database Platform for SAP HANA

Feature Testing
----------------------

  • DDL Generation - Succeeds
  • Outer Join - Succeeds
  • Subquery - Succeeds
  • Stored Procedure Calls - Not supported
  • Stored Procedure Generation - Not supported
  • 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\"")
  • Pessimistic locking adds 'FOR UPDATE' to the SELECT statement, and cannot be used with queries that use DISTINCT.
  • Pessimistic locking cannot be used with queries that select from multiple tables.
  • 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).
  • 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). <li>'= NULL' and '<> NULL' cannot be used for null comparisons in the WHERE clause. Use 'IS (NOT) NULL' instead.
  • Scrollable cursors are not supported.
  • Query timeouts are not supported.
See Also:
Author:
Reiner Singer (SAP AG), Sabine Heider (SAP AG)
  • Field Summary

    Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform

    DEFAULT_VARCHAR_SIZE

    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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    appendCalendar(Calendar calendar, Writer writer)
    Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.
    protected void
    appendDate(Date date, Writer writer)
    Answer a platform correct string representation of a Date, suitable for SQL generation.
    protected void
    appendTime(Time time, Writer writer)
    Answer a platform correct string representation of a Time, suitable for SQL generation.
    protected void
    appendTimestamp(Timestamp timestamp, Writer writer)
    Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
    protected Hashtable
    Return the mapping of class types to database types for the schema framework.
    INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence).
    boolean
    canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
    INTERNAL: Supports Batch Writing with Optimistic Locking.
    int
    computeMaxRowsForSQL(int firstResultIndex, int maxResults)
    INTERNAL: Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL.
    INTERNAL: Build locate operator with 3 params i.e.
    INTERNAL: Build locate operator i.e.
    int
    executeBatch(Statement statement, boolean isStatementPrepared)
    Internal: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes.
    protected String
    INTERNAL: Override this method if the platform supports temporary tables.
    Used for stored procedure creation: Prefix for INPUT parameters.
    int
    INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
    This method is used to print the output parameter token when stored procedures are called
    Used for sp calls.
    Used for sp calls.
    org.eclipse.persistence.internal.helper.DatabaseTable
    getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
    INTERNAL: May override this method if the platform support temporary tables.
    protected void
    Initialize any platform-specific operators
    boolean
    INTERNAL: Indicates whether SELECT DISTINCT ...
    boolean
     
    protected void
    printFieldTypeSize(Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType)
     
    void
    printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
    INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.
    boolean
    Used for table creation.
    boolean
    INTERNAL: That method affects UpdateAllQuery and DeleteAllQuery execution.
    boolean
    PUBLIC: Allows platform to choose whether to bind literals in DatabaseCalls or not.
    boolean
    Return if our driver level data conversion optimization is enabled.
    boolean
    Some database require outer joins to be given in the where clause, others require it in the from clause.
    boolean
    INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g.
    protected boolean
    INTERNAL: Indicates whether temporary table can specify primary keys (some platforms don't allow that).
    boolean
    JDBC defines and outer join syntax, many drivers do not support this.
    boolean
     
    boolean
    INTERNAL: Indicates whether the platform supports global temporary tables.
    boolean
    INTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.
    boolean
    INTERNAL: Indicates whether the platform supports local temporary tables.
    boolean
     
    boolean
    INTERNAL: Indicates whether the platform supports sequence objects.
    boolean
     
    boolean
     
    void
    writeAddColumnClause(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session, TableDefinition table, FieldDefinition field)
    INTERNAL: May need to override this method if the platform supports ALTER TABLE ADD <column> and the generated sql doesn't work.

    Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

    addBatch, addStructConverter, allowBindingForSelectClause, allowsSizeInProcedureArguments, appendBoolean, appendByteArray, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBuildCallWithReturning, checkTableExists, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureArgument, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, minimumTimeIncrement, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, 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, shouldBindAllParameters, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsIndexes, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, wasFailureCommunicationBased, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql

    Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

    addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsIdentity, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HANAPlatform

      public HANAPlatform()
  • Method Details

    • isHANA

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

      public boolean usesStringBinding()
      Overrides:
      usesStringBinding in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • requiresUniqueConstraintCreationOnTableCreate

      public boolean requiresUniqueConstraintCreationOnTableCreate()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Used for table creation. If a database platform does not support ALTER TABLE syntax to add/drop unique constraints (like Symfoware), overriding this method will allow the constraint to be specified in the CREATE TABLE statement.

      This only affects unique constraints specified using the UniqueConstraint annotation or equivalent method. Columns for which the 'unique' attribute is set to true will be declared 'UNIQUE' in the CREATE TABLE statement regardless of the return value of this method.

      Overrides:
      requiresUniqueConstraintCreationOnTableCreate in class org.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.
    • isForUpdateCompatibleWithDistinct

      public boolean isForUpdateCompatibleWithDistinct()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform (Oracle doesn't allow this).
      Overrides:
      isForUpdateCompatibleWithDistinct in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • supportsIndividualTableLocking

      public boolean supportsIndividualTableLocking()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery. Example: the following locks the rows in SALARY table, doesn't lock the rows in EMPLOYEE table: on Oracle platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WHERE ... FOR UPDATE t1.SALARY on SQLServer platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WITH (UPDLOCK) WHERE ...
      Overrides:
      supportsIndividualTableLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • buildFieldTypes

      protected Hashtable 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 org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • printFieldTypeSize

      protected void printFieldTypeSize(Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType) throws IOException
      Overrides:
      printFieldTypeSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • initializePlatformOperators

      protected void initializePlatformOperators()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      Initialize any platform-specific operators
      Overrides:
      initializePlatformOperators in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • createLocateOperator

      public static ExpressionOperator createLocateOperator()
      INTERNAL: Build locate operator i.e. LOCATE("ob", t0.F_NAME)
    • createLocate2Operator

      public static ExpressionOperator createLocate2Operator()
      INTERNAL: Build locate operator with 3 params i.e. LOCATE("coffee", t0.DESCRIP, 4). Last parameter is a start at.
    • 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)
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.
      Overrides:
      printSQLSelectStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • computeMaxRowsForSQL

      public int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: 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 By default, we assume case 1 and simply return the value of maxResults. Subclasses may provide an override
      Overrides:
      computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      See Also:
    • shouldOptimizeDataConversion

      public boolean shouldOptimizeDataConversion()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Return if our driver level data conversion optimization is enabled. This can be disabled as some drivers perform data conversion themselves incorrectly.
      Overrides:
      shouldOptimizeDataConversion in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • supportsNativeSequenceNumbers

      public boolean supportsNativeSequenceNumbers()
      Overrides:
      supportsNativeSequenceNumbers in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • buildSelectQueryForSequenceObject

      public ValueReadQuery buildSelectQueryForSequenceObject(String sequenceName, Integer size)
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence). In case the other version of this method (taking no parameters) returns null, this method is called every time sequence object NativeSequence reads. If the platform supportsSequenceObjects then (at least) one of buildSelectQueryForSequenceObject methods should return non-null query.
      Overrides:
      buildSelectQueryForSequenceObject in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • supportsGlobalTempTables

      public boolean supportsGlobalTempTables()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Indicates whether the platform supports global temporary tables. "Global" means that an attempt to create temporary table with the same name for the second time results in exception. EclipseLink attempts to create global temporary table in the beginning of UpdateAllQuery, execution and assumes that it already exists in case SQLException results. In the end of UpdateAllQuery execution all rows are removed from the temporary table - it is necessary in case the same temporary table will be used by another UpdateAllQuery in the same transaction. Override this method if the platform supports global temporary tables. Note that this method is ignored in case supportsLocalTempTables() returns true.
      Overrides:
      supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • getCreateTempTableSqlPrefix

      protected String getCreateTempTableSqlPrefix()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Override this method if the platform supports temporary tables. This should contain the beginning of sql string for creating temporary table - the sql statement name, for instance: "CREATE GLOBAL TEMPORARY TABLE ". Don't forget to end it with a space.
      Overrides:
      getCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • getTempTableForTable

      public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: May override this method if the platform support temporary tables.
      Overrides:
      getTempTableForTable in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Parameters:
      table - is original table for which temp table is created.
      Returns:
      temporary table
    • shouldTempTableSpecifyPrimaryKeys

      protected boolean shouldTempTableSpecifyPrimaryKeys()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Indicates whether temporary table can specify primary keys (some platforms don't allow that). Used by writeCreateTempTableSql method.
      Overrides:
      shouldTempTableSpecifyPrimaryKeys in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • getMaxFieldNameSize

      public int getMaxFieldNameSize()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
      Overrides:
      getMaxFieldNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • 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
    • shouldAlwaysUseTempStorageForModifyAll

      public boolean shouldAlwaysUseTempStorageForModifyAll()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: That method affects UpdateAllQuery and DeleteAllQuery execution. In case it returns false modify all queries would attempt to proceed without using temporary storage if it is possible. In case it returns true modify all queries would use temporary storage unless each modify statement doesn't reference any other tables. May need to override this method if the platform can't handle the sql generated for modify all queries without using temporary storage.
      Overrides:
      shouldAlwaysUseTempStorageForModifyAll in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • shouldBindLiterals

      public boolean shouldBindLiterals()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      PUBLIC: Allows platform to choose whether to bind literals in DatabaseCalls or not.
      Overrides:
      shouldBindLiterals in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • shouldPrintOuterJoinInWhereClause

      public boolean shouldPrintOuterJoinInWhereClause()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Some database require outer joins to be given in the where clause, others require it in the from clause.
      Overrides:
      shouldPrintOuterJoinInWhereClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • shouldUseJDBCOuterJoinSyntax

      public boolean shouldUseJDBCOuterJoinSyntax()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      JDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.
      Overrides:
      shouldUseJDBCOuterJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • supportsSequenceObjects

      public boolean supportsSequenceObjects()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      INTERNAL: Indicates whether the platform supports sequence objects. This method is to be used *ONLY* by sequencing classes
      Overrides:
      supportsSequenceObjects in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • canBatchWriteWithOptimisticLocking

      public boolean canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: Supports Batch Writing with Optimistic Locking.
      Overrides:
      canBatchWriteWithOptimisticLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • executeBatch

      public int executeBatch(Statement statement, boolean isStatementPrepared) throws SQLException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Internal: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes.
      Overrides:
      executeBatch in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      isStatementPrepared - - flag is set to true if this statement is prepared
      Returns:
      - number of rows modified/deleted by this statement
      Throws:
      SQLException
    • supportsForeignKeyConstraints

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

      public String getOutputProcedureToken()
      This method is used to print the output parameter token when stored procedures are called
      Overrides:
      getOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • getProcedureCallTail

      public String getProcedureCallTail()
      Used for sp calls.
      Overrides:
      getProcedureCallTail in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • shouldPrintStoredProcedureArgumentNameInCall

      public boolean 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 = ?)
      Overrides:
      shouldPrintStoredProcedureArgumentNameInCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • supportsStoredFunctions

      public boolean supportsStoredFunctions()
      Overrides:
      supportsStoredFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • appendDate

      protected void appendDate(Date date, Writer writer) throws IOException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Answer a platform correct string representation of a Date, suitable for SQL generation. The date is printed in the ODBC platform independent format {d 'yyyy-mm-dd'}.
      Overrides:
      appendDate in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • appendTime

      protected void appendTime(Time time, Writer writer) throws IOException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Answer a platform correct string representation of a Time, suitable for SQL generation. The time is printed in the ODBC platform independent format {t'hh:mm:ss'}.
      Overrides:
      appendTime in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • appendTimestamp

      protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Answer a platform correct string representation of a Timestamp, suitable for SQL generation. The timestamp is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
      Overrides:
      appendTimestamp in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • appendCalendar

      protected void appendCalendar(Calendar calendar, Writer writer) throws IOException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation. The calendar is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
      Overrides:
      appendCalendar in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • writeAddColumnClause

      public void writeAddColumnClause(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session, TableDefinition table, FieldDefinition field) throws IOException
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      INTERNAL: May need to override this method if the platform supports ALTER TABLE ADD <column> and the generated sql doesn't work. Write the string that follows ALTER TABLE to create a sql statement for the platform in order to append a new column to an existing table.
      Overrides:
      writeAddColumnClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      IOException
    • getProcedureCallHeader

      public String getProcedureCallHeader()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Used for sp calls.
      Overrides:
      getProcedureCallHeader in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform