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, usesStringBindingconversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, platformOperators, sequences, tableQualifier, timestampQuery| Constructor and Description |
|---|
DerbyPlatform() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendByteArray(byte[] bytes,
java.io.Writer writer)
INTERNAL:
TODO: Need to find out how can byte arrays be inlined in Derby
|
protected java.util.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 java.lang.String |
getCreateTempTableSqlBodyForTable(DatabaseTable table)
INTERNAL:
|
protected java.lang.String |
getCreateTempTableSqlSuffix()
INTERNAL:
|
java.lang.String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
java.util.Vector |
getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
INTERNAL:
Return the catalog information through using the native SQL catalog selects.
|
java.lang.String |
getProcedureBeginString()
Used for stored procedure defs.
|
java.lang.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(java.io.Writer writer)
INTERNAL:
Append the receiver's field 'identity' constraint clause to a writer.
|
boolean |
shouldIgnoreException(java.sql.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(java.io.Writer writer,
DatabaseTable table,
java.util.Collection pkFields,
java.util.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, writeParameterMarkerallowsSizeInProcedureArguments, 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, writeLOBaddOperator, 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, usesPlatformDefaultSequenceprotected void appendByteArray(byte[] bytes,
java.io.Writer writer)
throws java.io.IOException
appendByteArray in class DB2Platformjava.io.IOExceptionpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface PlatformgetTimestampQuery in class DB2Platformpublic java.util.Vector getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
DB2PlatformgetNativeTableInfo in class DB2Platformpublic java.lang.String getProcedureEndString()
getProcedureEndString in class DB2Platformpublic java.lang.String getProcedureBeginString()
getProcedureBeginString in class DB2Platformpublic java.lang.String getInOutputProcedureToken()
getInOutputProcedureToken in class DatabasePlatformpublic boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart in class DB2Platformpublic boolean isDerby()
isDerby in interface PlatformisDerby in class DatasourcePlatformpublic boolean isDB2()
isDB2 in interface PlatformisDB2 in class DB2Platformpublic boolean shouldIgnoreException(java.sql.SQLException exception)
shouldIgnoreException in class DB2Platformprotected java.lang.String getCreateTempTableSqlSuffix()
getCreateTempTableSqlSuffix in class DB2Platformpublic boolean supportsNativeSequenceNumbers()
DB2PlatformsupportsNativeSequenceNumbers in class DB2Platformpublic boolean shouldNativeSequenceAcquireValueAfterInsert()
shouldNativeSequenceAcquireValueAfterInsert in class DB2Platformpublic ValueReadQuery buildSelectQueryForNativeSequence()
buildSelectQueryForNativeSequence in class DB2Platformprotected boolean shouldTempTableSpecifyPrimaryKeys()
shouldTempTableSpecifyPrimaryKeys in class DatabasePlatformprotected java.lang.String getCreateTempTableSqlBodyForTable(DatabaseTable table)
getCreateTempTableSqlBodyForTable in class DB2Platformpublic void writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
throws java.io.IOException
writeUpdateOriginalFromTempTableSql in class DatabasePlatformjava.io.IOExceptionpublic void printFieldIdentityClause(java.io.Writer writer)
throws ValidationException
printFieldIdentityClause in class DB2PlatformValidationExceptionprotected java.util.Hashtable buildFieldTypes()
DatabasePlatformbuildFieldTypes in class DB2Platform