|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.oracle.OraclePkGenerator
org.apache.cayenne.dba.postgres.PostgresPkGenerator
public class PostgresPkGenerator
Default PK generator for PostgreSQL that uses sequences for PK generation.
Field Summary |
---|
Fields inherited from class org.apache.cayenne.dba.JdbcPkGenerator |
---|
adapter, DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize |
Constructor Summary | |
---|---|
protected |
PostgresPkGenerator(JdbcAdapter adapter)
|
Method Summary | |
---|---|
protected java.lang.String |
createSequenceString(DbEntity ent)
|
protected java.util.List<java.lang.String> |
getExistingSequences(DataNode node)
Fetches a list of existing sequences that might match Cayenne generated ones. |
protected long |
longPkFromDatabase(DataNode node,
DbEntity entity)
Generates primary key by calling Oracle sequence corresponding to the dbEntity . |
Methods inherited from class org.apache.cayenne.dba.oracle.OraclePkGenerator |
---|
createAutoPk, createAutoPkStatements, dropAutoPk, dropAutoPkStatements, dropSequenceString, pkCacheSize, sequenceName, stripSchemaName |
Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator |
---|
autoPkTableExists, dropAutoPkString, generatePk, getAdapter, getPkCacheSize, pkCreateString, pkDeleteString, pkSelectString, pkTableCreateString, pkUpdateString, reset, runUpdate, setPkCacheSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PostgresPkGenerator(JdbcAdapter adapter)
Method Detail |
---|
protected java.lang.String createSequenceString(DbEntity ent)
createSequenceString
in class OraclePkGenerator
protected long longPkFromDatabase(DataNode node, DbEntity entity) throws java.lang.Exception
OraclePkGenerator
dbEntity
. Executed SQL looks like this:
SELECT pk_table_name.nextval FROM DUAL
longPkFromDatabase
in class OraclePkGenerator
java.lang.Exception
protected java.util.List<java.lang.String> getExistingSequences(DataNode node) throws java.sql.SQLException
getExistingSequences
in class OraclePkGenerator
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |