public class DerbyPlatform extends DB2Platform
Purpose: Provides Derby DBMS specific behaviour.
classTypes, cursorCode, fieldTypes, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, supportsAutoCommit, transactionIsolation, usesByteArrayBinding, usesNativeSQL, usesStreamsForBinding, usesStringBinding
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, platformOperators, sequences, tableQualifier, timestampQuery
Constructor and Description |
---|
DerbyPlatform() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendByteArray(byte[] bytes,
Writer writer)
INTERNAL:
TODO: Need to find out how can byte arrays be inlined in Derby
|
protected Hashtable |
buildFieldTypes()
Return the mapping of class types to database types for the schema framework.
|
ValueReadQuery |
buildSelectQueryForNativeSequence()
INTERNAL:
Build the identity query for native sequencing.
|
protected String |
getCreateTempTableSqlBodyForTable(DatabaseTable table)
INTERNAL:
|
protected String |
getCreateTempTableSqlSuffix()
INTERNAL:
|
String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
Vector |
getNativeTableInfo(String table,
String creator,
AbstractSession session)
INTERNAL:
Return the catalog information through using the native SQL catalog selects.
|
String |
getProcedureBeginString()
Used for stored procedure defs.
|
String |
getProcedureEndString()
Used for stored procedure defs.
|
ValueReadQuery |
getTimestampQuery()
INTERNAL:
This method returns the query to select the timestamp from the server
for Derby.
|
boolean |
isDB2() |
boolean |
isDerby()
INTERNAL:
Answers whether platform is Derby
|
void |
printFieldIdentityClause(Writer writer)
INTERNAL:
Append the receiver's field 'identity' constraint clause to a writer.
|
boolean |
shouldIgnoreException(SQLException exception)
Allow for the platform to ignore exceptions.
|
boolean |
shouldNativeSequenceAcquireValueAfterInsert()
INTERNAL:
Indicates whether NativeSequence should retrieve
sequence value after the object has been inserted into the db
This method is to be used *ONLY* by sequencing classes
|
boolean |
shouldPrintOutputTokenAtStart()
This is required in the construction of the stored procedures with
output parameters
|
protected boolean |
shouldTempTableSpecifyPrimaryKeys()
INTERNAL:
Indicates whether temporary table can specify primary keys (some platforms don't allow that).
|
boolean |
supportsNativeSequenceNumbers()
Return true if the receiver uses host sequence numbers, generated on the database.
|
void |
writeUpdateOriginalFromTempTableSql(Writer writer,
DatabaseTable table,
Collection pkFields,
Collection assignedFields)
INTERNAL:
May need to override this method if the platform supports temporary tables
and the generated sql doesn't work.
|
appendCalendar, appendDate, appendDB2Calendar, appendDB2Date, appendDB2Timestamp, appendTime, appendTimestamp, getCreateTempTableSqlPrefix, getMaxFieldNameSize, getMaxForeignKeyNameSize, getProcedureAsString, getProcedureCallHeader, getSelectForUpdateString, getTempTableForTable, initializePlatformOperators, isNullAllowedInSelectClause, maximumNumericValues, minimumNumericValues, shouldBindLiterals, shouldUseJDBCOuterJoinSyntax, supportsGlobalTempTables, writeParameterMarker
allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildCallWithReturning, buildClassTypes, buildSelectQueryForNativeSequence, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createPlatformDefaultSequence, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getClassTypes, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxUniqueKeyNameSize, getObjectFromResultSet, getOutputProcedureToken, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureCallTail, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getTransactionIsolation, isInformixOuterJoin, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, processResultSet, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, rollbackTransaction, setClassTypes, setCursorCode, setFieldTypes, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setPrimitiveParameterValue, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesByteArrayBinding, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAcquireSequenceValueAfterInsert, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintInOutputTokenBeforeType, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldTrimStrings, supportsAutoCommit, supportsForeignKeyConstraints, supportsLocalTempTables, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueKeyConstraints, usesByteArrayBinding, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB
addOperator, addSequence, clone, convertObject, createSequences, getConversionManager, getCustomModifyValueForCall, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getOperator, getPlatformOperators, getSequence, getSequences, getSequencesToWrite, getTableQualifier, getTimestampFromServer, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDBase, isHSQL, isInformix, isMySQL, isODBC, isOracle, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, platformSpecificSequencingInitialization, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setSequences, setTableQualifier, setTimestampQuery, shouldUseCustomModifyForCall, toString, usesPlatformDefaultSequence
protected void appendByteArray(byte[] bytes, Writer writer) throws IOException
appendByteArray
in class DB2Platform
IOException
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface Platform
getTimestampQuery
in class DB2Platform
public Vector getNativeTableInfo(String table, String creator, AbstractSession session)
DB2Platform
getNativeTableInfo
in class DB2Platform
public String getProcedureEndString()
getProcedureEndString
in class DB2Platform
public String getProcedureBeginString()
getProcedureBeginString
in class DB2Platform
public String getInOutputProcedureToken()
getInOutputProcedureToken
in class DatabasePlatform
public boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart
in class DB2Platform
public boolean isDerby()
isDerby
in interface Platform
isDerby
in class DatasourcePlatform
public boolean isDB2()
isDB2
in interface Platform
isDB2
in class DB2Platform
public boolean shouldIgnoreException(SQLException exception)
shouldIgnoreException
in class DB2Platform
protected String getCreateTempTableSqlSuffix()
getCreateTempTableSqlSuffix
in class DB2Platform
public boolean supportsNativeSequenceNumbers()
DB2Platform
supportsNativeSequenceNumbers
in class DB2Platform
public boolean shouldNativeSequenceAcquireValueAfterInsert()
shouldNativeSequenceAcquireValueAfterInsert
in class DB2Platform
public ValueReadQuery buildSelectQueryForNativeSequence()
buildSelectQueryForNativeSequence
in class DB2Platform
protected boolean shouldTempTableSpecifyPrimaryKeys()
shouldTempTableSpecifyPrimaryKeys
in class DatabasePlatform
protected String getCreateTempTableSqlBodyForTable(DatabaseTable table)
getCreateTempTableSqlBodyForTable
in class DB2Platform
public void writeUpdateOriginalFromTempTableSql(Writer writer, DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException
writeUpdateOriginalFromTempTableSql
in class DatabasePlatform
IOException
public void printFieldIdentityClause(Writer writer) throws ValidationException
printFieldIdentityClause
in class DB2Platform
ValidationException
protected Hashtable buildFieldTypes()
DatabasePlatform
buildFieldTypes
in class DB2Platform
Copyright © 2022. All rights reserved.