Package org.apache.cayenne.dba.derby
Class DerbyPkGenerator
java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.SequencePkGenerator
org.apache.cayenne.dba.derby.DerbyPkGenerator
- All Implemented Interfaces:
PkGenerator
PK generator for Derby that uses sequences.
- Since:
- 4.0 (old one used AUTO_PK_SUPPORT table)
-
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 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, getSequencePrefix, 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
-
DerbyPkGenerator
-
-
Method Details
-
sequenceName
- Overrides:
sequenceNamein 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
-