Module eclipselink

Class DBasePlatform

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

Purpose: Provides DBase specific behavior.

Responsibilities:

  • Writing Time & Timestamp as strings since they are not supported.
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.
    INTERNAL We support more primitive than JDBC does so we must do conversion before printing or binding.
    int
    INTERNAL: returns the maximum number of characters that can be used in a field name on this platform.
    Most database support a syntax. although don't actually lock the row.
    boolean
     
    Map<Class<? extends Number>,? super Number>
    Builds a table of minimum 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 'NOT NULL' constraint clause to a writer.
    void
    setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, org.eclipse.persistence.internal.sessions.AbstractSession session)
    INTERNAL: DBase does not support Time/Timestamp so we must map to strings.
    void
    setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.AbstractSession session)
    INTERNAL: DBase does not support Time/Timestamp so we must map to strings.
    boolean
    JDBC defines and outer join syntax, many drivers do not support this.
    boolean
     
    boolean
    Indicates whether the platform supports primary key constraints.

    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, buildJavaTypes, buildProcedureCallString, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkSequenceExists, checkTableExists, commitTransaction, computeMaxRowsForSQL, 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, 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, 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, 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, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, initializePlatformOperators, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, 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, supportsIdentity, 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, printFieldIdentityClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresTableInIndexDropDDL, requiresUniqueConstraintCreationOnTableCreate, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldPrintConstraintNameAfter, shouldPrintInputTokenAtStart, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, supportsDeleteOnCascade, supportsFractionalTime, supportsIndexes, supportsStoredFunctions, supportsUniqueColumns, supportsUniqueKeyConstraints, writeTableCreationSuffix

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

    connectionProperties
  • Constructor Details

    • DBasePlatform

      public DBasePlatform()
      Default constructor.
  • 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 org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • convertToDatabaseType

      public Object convertToDatabaseType(Object value)
      INTERNAL We support more primitive than JDBC does so we must do conversion before printing or binding.
      Overrides:
      convertToDatabaseType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • setParameterValueInDatabaseCall

      public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException
      INTERNAL: DBase does not support Time/Timestamp so we must map to strings.
      Overrides:
      setParameterValueInDatabaseCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      SQLException
    • setParameterValueInDatabaseCall

      public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException
      INTERNAL: DBase does not support Time/Timestamp so we must map to strings.
      Overrides:
      setParameterValueInDatabaseCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Throws:
      SQLException
    • getMaxFieldNameSize

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

      public String getSelectForUpdateString()
      Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      Most database support a syntax. although don't actually lock the row. Some require the OF some don't like it.
      Overrides:
      getSelectForUpdateString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
    • isDBase

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

      public Map<Class<? extends Number>,? super Number> maximumNumericValues()
      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:
      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
    • printFieldNotNullClause

      public void printFieldNotNullClause(Writer writer)
      Append the receiver's field 'NOT NULL' constraint clause to a writer.
      Parameters:
      writer - the writer to append to
    • 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
    • supportsForeignKeyConstraints

      public boolean supportsForeignKeyConstraints()
    • supportsPrimaryKeyConstraint

      public boolean supportsPrimaryKeyConstraint()
      Description copied from interface: DDLPlatform
      Indicates whether the platform supports primary key constraints.
      Returns:
      true if primary key constraints are supported; false otherwise