Package org.apache.cayenne.dba.derby
Class DerbyPkGenerator
java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.oracle.OraclePkGenerator
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
createSequenceString
(DbEntity entity) protected String
dropSequenceString
(DbEntity entity) Returns a SQL string needed to drop any database objects associated with automatic primary key generation process for a specific DbEntity.protected String
protected String
selectNextValQuery
(String pkGeneratingSequenceName) protected String
sequenceName
(DbEntity entity) Returns expected primary key sequence name for a DbEntity.Methods inherited from class org.apache.cayenne.dba.oracle.OraclePkGenerator
createAutoPk, createAutoPkStatements, dropAutoPk, dropAutoPkStatements, getExistingSequences, getSequencePrefix, longPkFromDatabase, pkCacheSize
Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator
autoPkTableExists, dropAutoPkString, generatePk, getAdapter, getPkCacheSize, pkCreateString, pkDeleteString, pkSelectString, pkTableCreateString, pkUpdateString, reset, runUpdate, setAdapter, setPkCacheSize
-
Constructor Details
-
DerbyPkGenerator
public DerbyPkGenerator()Used by DI- Since:
- 4.1
-
-
Method Details
-
sequenceName
Description copied from class:OraclePkGenerator
Returns expected primary key sequence name for a DbEntity.- Overrides:
sequenceName
in classOraclePkGenerator
-
selectNextValQuery
- Overrides:
selectNextValQuery
in classOraclePkGenerator
-
selectAllSequencesQuery
- Overrides:
selectAllSequencesQuery
in classOraclePkGenerator
-
dropSequenceString
Description copied from class:OraclePkGenerator
Returns a SQL string needed to drop any database objects associated with automatic primary key generation process for a specific DbEntity.- Overrides:
dropSequenceString
in classOraclePkGenerator
-
createSequenceString
- Overrides:
createSequenceString
in classOraclePkGenerator
-