|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.DB2Platform
org.eclipse.persistence.platform.database.DerbyPlatform
public class DerbyPlatform
Purpose: Provides Derby DBMS specific behavior.
Field Summary | |
---|---|
protected boolean |
isConnectionDataInitialized
|
protected boolean |
isSequenceSupported
Allow sequence support to be disabled for Derby < 10.6.1. |
static int |
MAX_BLOB
|
static int |
MAX_CLOB
|
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform |
---|
DEFAULT_VARCHAR_SIZE |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery |
Constructor Summary | |
---|---|
DerbyPlatform()
|
Method Summary | |
---|---|
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()
|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing. |
java.io.Writer |
buildSequenceObjectDeletionWriter(java.io.Writer writer,
java.lang.String fullSeqName)
INTERNAL: Derby supports sequence objects as of 10.6.1. |
int |
computeMaxRowsForSQL(int firstResultIndex,
int maxResults)
INTERNAL: Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL. |
static ExpressionOperator |
extractOperator()
INTERNAL: Derby does not support EXTRACT, but does have YEAR, MONTH, DAY, etc. |
protected java.lang.String |
getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.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,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Not currently used. |
java.lang.String |
getProcedureBeginString()
Used for stored procedure defs. |
java.lang.String |
getProcedureEndString()
Used for stored procedure defs. |
java.lang.String |
getSelectForUpdateString()
INTERNAL: Used for pessimistic locking in DB2. |
ValueReadQuery |
getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for Derby. |
void |
initializeConnectionData(java.sql.Connection connection)
INTERNAL: |
protected void |
initializePlatformOperators()
Initialize any platform-specific operators |
boolean |
isAlterSequenceObjectSupported()
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8. |
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. |
void |
printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
INTERNAL: Derby supports pagination through its "OFFSET n ROWS FETCH NEXT m ROWS" syntax. |
protected void |
setNullFromDatabaseField(org.eclipse.persistence.internal.helper.DatabaseField databaseField,
java.sql.PreparedStatement statement,
int index)
|
boolean |
shouldIgnoreException(java.sql.SQLException exception)
Allow for the platform to ignore exceptions. |
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 |
supportsSequenceObjects()
INTERNAL: Derby supports sequence objects as of 10.6.1. |
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
org.eclipse.persistence.internal.helper.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. |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
---|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxIndexNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureCallTail, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isLockTimeoutException, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeTableCreationSuffix |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
---|
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDBase, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_CLOB
public static final int MAX_BLOB
protected boolean isSequenceSupported
protected boolean isConnectionDataInitialized
Constructor Detail |
---|
public DerbyPlatform()
Method Detail |
---|
protected void appendByteArray(byte[] bytes, java.io.Writer writer) throws java.io.IOException
appendByteArray
in class DB2Platform
java.io.IOException
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface org.eclipse.persistence.internal.databaseaccess.Platform
getTimestampQuery
in class DB2Platform
public java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, org.eclipse.persistence.internal.sessions.AbstractSession session)
getNativeTableInfo
in class DB2Platform
public java.lang.String getProcedureEndString()
getProcedureEndString
in class DB2Platform
public java.lang.String getProcedureBeginString()
getProcedureBeginString
in class DB2Platform
public java.lang.String getInOutputProcedureToken()
getInOutputProcedureToken
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart
in class DB2Platform
public boolean isDerby()
isDerby
in interface org.eclipse.persistence.internal.databaseaccess.Platform
isDerby
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean isDB2()
isDB2
in interface org.eclipse.persistence.internal.databaseaccess.Platform
isDB2
in class DB2Platform
public java.lang.String getSelectForUpdateString()
DB2Platform
getSelectForUpdateString
in class DB2Platform
public boolean shouldIgnoreException(java.sql.SQLException exception)
shouldIgnoreException
in class DB2Platform
protected java.lang.String getCreateTempTableSqlSuffix()
getCreateTempTableSqlSuffix
in class DB2Platform
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity
in class DB2Platform
protected boolean shouldTempTableSpecifyPrimaryKeys()
shouldTempTableSpecifyPrimaryKeys
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getCreateTempTableSqlBodyForTable
in class DB2Platform
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
writeUpdateOriginalFromTempTableSql
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
printFieldIdentityClause
in class DB2Platform
ValidationException
protected java.util.Hashtable buildFieldTypes()
buildFieldTypes
in class DB2Platform
protected void setNullFromDatabaseField(org.eclipse.persistence.internal.helper.DatabaseField databaseField, java.sql.PreparedStatement statement, int index) throws java.sql.SQLException
setNullFromDatabaseField
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.sql.SQLException
protected void initializePlatformOperators()
initializePlatformOperators
in class DB2Platform
public static ExpressionOperator extractOperator()
public int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
computeMaxRowsForSQL
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
printSQLSelectStatement
in class DB2Platform
public boolean supportsSequenceObjects()
supportsSequenceObjects
in class DB2Platform
public boolean isAlterSequenceObjectSupported()
DB2Platform
isAlterSequenceObjectSupported
in class DB2Platform
public java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer, java.lang.String fullSeqName) throws java.io.IOException
buildSequenceObjectDeletionWriter
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public void initializeConnectionData(java.sql.Connection connection) throws java.sql.SQLException
initializeConnectionData
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.sql.SQLException
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |