Package org.apache.cayenne.dba.db2
Class DB2PkGenerator
java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.oracle.OraclePkGenerator
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
-
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
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, 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
-
DB2PkGenerator
public DB2PkGenerator()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
-
getSequencePrefix
- Overrides:
getSequencePrefix
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
-