org.eclipse.persistence.platform.database
Class FirebirdPlatform

java.lang.Object
  extended by org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      extended by org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
          extended by org.eclipse.persistence.platform.database.DatabasePlatform
              extended by org.eclipse.persistence.platform.database.FirebirdPlatform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.internal.databaseaccess.Platform

public class FirebirdPlatform
extends DatabasePlatform

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, Types_NCLOB
 
Constructor Summary
FirebirdPlatform()
           
 
Method Summary
 ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
          INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence).
 java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment, int start)
          INTERNAL: Returns sql used to create sequence object in the database.
 java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer, java.lang.String fullSeqName)
          INTERNAL: Returns sql used to delete sequence object from the database.
 int getMaxForeignKeyNameSize()
          INTERNAL: returns the maximum number of characters that can be used in a foreign key name on this platform.
 int getMaxUniqueKeyNameSize()
          INTERNAL: returns the maximum number of characters that can be used in a unique key name on this platform.
 java.lang.String getSelectForUpdateString()
          WITH LOCK is required on FB to hold the lock.
 ValueReadQuery getTimestampQuery()
          This method can be overridden by subclasses to return a query that will return the timestamp from the server.
 boolean isAlterSequenceObjectSupported()
          INTERNAL: Override this method if the platform supports sequence objects and it's possible to alter sequence object's increment in the database.
 boolean isDynamicSQLRequiredForFunctions()
          INTERNAL Firebird has some issues with using parameters on certain functions and relations.
 boolean isFirebird()
           
static ExpressionOperator monthsBetweenOperator()
          INTERNAL: Use MONTH function for MONTH_BETWEEN.
 void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
          Print the pagination SQL using FB syntax " ROWS TO ".
 boolean supportsForeignKeyConstraints()
           
 boolean supportsSequenceObjects()
          INTERNAL: Indicates whether the platform supports sequence objects.
static ExpressionOperator toNumberOperator()
          INTERNAL: Use CONVERT function for toNumber.
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildCallWithReturning, buildCreateIndex, buildDropIndex, buildProcedureCallString, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSequenceObjectAlterIncrementWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxFieldNameSize, getMaxIndexNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTempTableForTable, getTransactionIsolation, getTypeConverters, initialize, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isLockTimeoutException, isNullAllowedInSelectClause, isXDBDocument, maximumNumericValues, minimumNumericValues, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, rollbackTransaction, setCastSizeForVarcharParameter, setCursorCode, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPingSQL, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseJDBCOuterJoinSyntax, shouldUseRownumFiltering, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsGlobalTempTables, supportsIdentity, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNativeSequenceNumbers, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeUpdateOriginalFromTempTableSql
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addSequence, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isH2, isHSQL, isInformix, isMySQL, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString, usesPlatformDefaultSequence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirebirdPlatform

public FirebirdPlatform()
Method Detail

getMaxForeignKeyNameSize

public int getMaxForeignKeyNameSize()
INTERNAL: returns the maximum number of characters that can be used in a foreign key name on this platform.

Overrides:
getMaxForeignKeyNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getMaxUniqueKeyNameSize

public int getMaxUniqueKeyNameSize()
INTERNAL: returns the maximum number of characters that can be used in a unique key name on this platform.

Overrides:
getMaxUniqueKeyNameSize in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getTimestampQuery

public ValueReadQuery getTimestampQuery()
Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
This method can be overridden by subclasses to return a query that will return the timestamp from the server. return null if the time should be the local time.

Specified by:
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

isAlterSequenceObjectSupported

public boolean isAlterSequenceObjectSupported()
Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
INTERNAL: Override this method if the platform supports sequence objects and it's possible to alter sequence object's increment in the database.

Overrides:
isAlterSequenceObjectSupported in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

buildSequenceObjectCreationWriter

public java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer,
                                                        java.lang.String fullSeqName,
                                                        int increment,
                                                        int start)
                                                 throws java.io.IOException
INTERNAL: Returns sql used to create sequence object in the database.

Overrides:
buildSequenceObjectCreationWriter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

buildSequenceObjectDeletionWriter

public java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer,
                                                        java.lang.String fullSeqName)
                                                 throws java.io.IOException
INTERNAL: Returns sql used to delete sequence object from the database.

Overrides:
buildSequenceObjectDeletionWriter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.io.IOException

buildSelectQueryForSequenceObject

public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName,
                                                        java.lang.Integer size)
Description copied from class: org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
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.DatabasePlatform

supportsSequenceObjects

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

supportsForeignKeyConstraints

public boolean supportsForeignKeyConstraints()
Overrides:
supportsForeignKeyConstraints in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

toNumberOperator

public static ExpressionOperator toNumberOperator()
INTERNAL: Use CONVERT function for toNumber.


monthsBetweenOperator

public static ExpressionOperator monthsBetweenOperator()
INTERNAL: Use MONTH function for MONTH_BETWEEN.


isFirebird

public boolean isFirebird()
Overrides:
isFirebird in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

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)
Print the pagination SQL using FB syntax " ROWS TO ".

Overrides:
printSQLSelectStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

isDynamicSQLRequiredForFunctions

public boolean isDynamicSQLRequiredForFunctions()
INTERNAL Firebird has some issues with using parameters on certain functions and relations. This allows statements to disable binding only in these cases.

Overrides:
isDynamicSQLRequiredForFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getSelectForUpdateString

public java.lang.String getSelectForUpdateString()
WITH LOCK is required on FB to hold the lock.

Overrides:
getSelectForUpdateString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform