Module eclipselink

Class AccessPlatform

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.AccessPlatform
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 AccessPlatform extends DatabasePlatform

Purpose: Provides Microsoft Access specific behavior.

See Also:
  • 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, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, 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
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the mapping of class types to database types for the schema framework.
    protected Map<String,Class<?>>
    Return the mapping of class types to database types for the schema framework.
    INTERNAL: Build the identity query for native sequencing.
    int
    INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
    getTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session, String sessionName)
    Access do not support millisecond well, truncate the millisecond from the timestamp
    protected void
    Initialize any platform-specific operators
    boolean
     
    Map<Class<? extends Number>,? super Number>
    Builds a table of maximum numeric values keyed on java class.
    Map<Class<? extends Number>,? super Number>
    Builds a table of minimum numeric values keyed on java class.
    void
    Append the receiver's field 'identity' constraint clause to a writer.
    void
    printFieldTypeSize(Writer writer, FieldDefinition field, FieldDefinition.DatabaseType fieldType, boolean shouldPrintFieldIdentityClause)
    Prints the field type size clause to the writer, including type name and optional size.
    void
    printFieldUnique(Writer writer, boolean shouldPrintFieldIdentityClause)
    Prints the platform-specific UNIQUE clause for a field.
    boolean
    This is used as some databases create the primary key constraint differently, i.e.
    boolean
    JDBC defines and outer join syntax, many drivers do not support this.
    boolean
    INTERNAL: Indicates whether the platform supports identity.

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

    addBatch, addStructConverter, allowBindingForSelectClause, appendBoolean, appendByteArray, appendCalendar, appendDate, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, appendTime, appendTimestamp, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildDropIndex, buildProcedureCallString, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkSequenceExists, checkTableExists, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getConnection, getConnectionUserName, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCursorCode, getCustomModifyValueForCall, getDatabaseType, getDatabaseTypes, getDefaultSequenceTableName, getDriverSupportsNVarChar, getExecuteBatchRowCounts, getFunctionCallHeader, getJavaTypes, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getJsonPlatform, getMaxBatchWritingSize, getNoWaitString, getObjectFromResultSet, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureCallHeader, getProcedureCallTail, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTempTableForTable, getTransactionIsolation, getTypeConverters, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDatabaseTypes, setDriverName, setDriverSupportsNVarChar, setExecuteBatchRowCounts, setIsCastRequired, setJavaTypes, 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, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintStoredProcedureArgumentNameInCall, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsGlobalTempTables, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsTempTables, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeDropColumnClause, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTruncateTable, writeUpdateOriginalFromTempTableSql

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

    addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequencePreallocationSize, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampQuery, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle23, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, 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 class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.persistence.tools.schemaframework.DDLPlatform

    allowsSizeInProcedureArguments, buildCreateIndex, buildDropIndex, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getDatabaseType, getDatabaseType, getDropCascadeString, getDropDatabaseSchemaString, getEndDelimiter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getOutputProcedureToken, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getProcedureOptionList, getStartDelimiter, getUniqueConstraintDeletionString, isAlterSequenceObjectSupported, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresUniqueConstraintCreationOnTableCreate, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldPrintConstraintNameAfter, shouldPrintInputTokenAtStart, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsFractionalTime, supportsIndexes, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsUniqueColumns, supportsUniqueKeyConstraints, writeTableCreationSuffix

    Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.Platform

    connectionProperties
  • Constructor Details

    • AccessPlatform

      public AccessPlatform()
      Default constructor.
  • Method Details

    • buildJavaTypes

      protected Map<String,Class<?>> buildJavaTypes()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Return the mapping of class types to database types for the schema framework.
      Overrides:
      buildJavaTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • 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 org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • getMaxFieldNameSize

      public int getMaxFieldNameSize()
      INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
    • getTimestampFromServer

      public Timestamp getTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session, String sessionName)
      Access do not support millisecond well, truncate the millisecond from the timestamp
      Specified by:
      getTimestampFromServer in interface org.eclipse.persistence.internal.databaseaccess.Platform
      Overrides:
      getTimestampFromServer in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • initializePlatformOperators

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

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

      public Map<Class<? extends Number>,? super Number> maximumNumericValues()
      Builds a table of maximum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

      NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale

      Overrides:
      maximumNumericValues in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • minimumNumericValues

      public Map<Class<? extends Number>,? super Number> minimumNumericValues()
      Builds a table of minimum numeric values keyed on java class. This is used for type testing but might also be useful to end users attempting to sanitize values.

      NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale

      Overrides:
      minimumNumericValues in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • requiresNamedPrimaryKeyConstraints

      public boolean requiresNamedPrimaryKeyConstraints()
      This is used as some databases create the primary key constraint differently, i.e. Access.
      Returns:
      true if named primary key constraints are required; false otherwise
    • shouldUseJDBCOuterJoinSyntax

      public boolean shouldUseJDBCOuterJoinSyntax()
      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
    • buildSelectQueryForIdentity

      public ValueReadQuery buildSelectQueryForIdentity()
      INTERNAL: Build the identity query for native sequencing.
      Overrides:
      buildSelectQueryForIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • printFieldIdentityClause

      public void printFieldIdentityClause(Writer writer) throws ValidationException
      Append the receiver's field 'identity' constraint clause to a writer.
      Parameters:
      writer - the writer to append to
      Throws:
      ValidationException
    • supportsIdentity

      public boolean supportsIdentity()
      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 org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
    • printFieldTypeSize

      public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldDefinition.DatabaseType fieldType, boolean shouldPrintFieldIdentityClause) throws IOException
      Description copied from interface: DDLPlatform
      Prints the field type size clause to the writer, including type name and optional size.
      Parameters:
      writer - the writer to append to
      field - the field definition
      fieldType - the field type definition
      shouldPrintFieldIdentityClause - indicates if the identity clause should be printed
      Throws:
      IOException - if an I/O error occurs while writing
    • printFieldUnique

      public void printFieldUnique(Writer writer, boolean shouldPrintFieldIdentityClause) throws IOException
      Description copied from interface: DDLPlatform
      Prints the platform-specific UNIQUE clause for a field.
      Parameters:
      writer - the writer to append to
      shouldPrintFieldIdentityClause - indicates if the identity clause should be printed
      Throws:
      IOException - if an I/O error occurs while writing