Package org.apache.cayenne.dba.db2
Class DB2PkGenerator
java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.SequencePkGenerator
org.apache.cayenne.dba.db2.DB2PkGenerator
- All Implemented Interfaces:
PkGenerator
A sequence-based PK generator used by
DB2Adapter.-
Field Summary
Fields inherited from class org.apache.cayenne.dba.JdbcPkGenerator
adapter, DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize, pkStartValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateSequenceString(DbEntity entity) protected StringdropSequenceString(DbEntity entity) Returns a SQL string needed to drop any database objects associated with automatic primary key generation process for a specific DbEntity.protected Stringprotected StringReturns a database-specific query that lists the names of all existing sequences.protected StringselectNextValQuery(String pkGeneratingSequenceName) Returns a database-specific query to fetch the next value of the named sequence.protected StringsequenceName(DbEntity entity) Methods inherited from class org.apache.cayenne.dba.SequencePkGenerator
createAutoPk, createAutoPkStatements, dropAutoPk, dropAutoPkStatements, getExistingSequences, longPkFromDatabase, pkCacheSizeMethods inherited from class org.apache.cayenne.dba.JdbcPkGenerator
autoPkTableExists, dropAutoPkString, generatePk, getAdapter, getPkCacheSize, pkCreateString, pkDeleteString, pkSelectString, pkTableCreateString, pkUpdateString, reset, runUpdate, setPkCacheSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.dba.PkGenerator
generatePk
-
Constructor Details
-
DB2PkGenerator
-
-
Method Details
-
sequenceName
- Overrides:
sequenceNamein classSequencePkGenerator
-
getSequencePrefix
- Overrides:
getSequencePrefixin classSequencePkGenerator
-
selectNextValQuery
Description copied from class:SequencePkGeneratorReturns a database-specific query to fetch the next value of the named sequence.- Specified by:
selectNextValQueryin classSequencePkGenerator
-
selectAllSequencesQuery
Description copied from class:SequencePkGeneratorReturns a database-specific query that lists the names of all existing sequences.- Specified by:
selectAllSequencesQueryin classSequencePkGenerator
-
dropSequenceString
Description copied from class:SequencePkGeneratorReturns a SQL string needed to drop any database objects associated with automatic primary key generation process for a specific DbEntity.- Overrides:
dropSequenceStringin classSequencePkGenerator
-
createSequenceString
- Overrides:
createSequenceStringin classSequencePkGenerator
-