|
||||||||||
| 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.frontbase.FrontBasePkGenerator
public class FrontBasePkGenerator
| Field Summary |
|---|
| Fields inherited from class org.apache.cayenne.dba.JdbcPkGenerator |
|---|
DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize |
| Constructor Summary | |
|---|---|
FrontBasePkGenerator()
|
|
| Method Summary | |
|---|---|
void |
createAutoPk(DataNode node,
List<DbEntity> dbEntities)
Generates necessary database objects to provide automatic primary key support. |
List<String> |
createAutoPkStatements(List<DbEntity> dbEntities)
Returns a list of SQL strings needed to generates database objects to provide automatic primary support for the list of entities. |
void |
dropAutoPk(DataNode node,
List<DbEntity> dbEntities)
Drops table named "AUTO_PK_SUPPORT" if it exists in the database. |
protected String |
dropAutoPkString()
|
int |
getPkCacheSize()
Retruns zero as PK caching is not supported by FrontBaseAdapter. |
protected long |
longPkFromDatabase(DataNode node,
DbEntity entity)
Performs primary key generation ignoring cache. |
protected String |
pkCreateString(String entName)
|
protected String |
pkDeleteString(List<DbEntity> dbEntities)
|
protected int |
pkFromDatabase(DataNode node,
DbEntity entity)
Deprecated. since 3.0 |
protected String |
pkSelectString(String entName)
|
protected String |
pkTableCreateString()
|
protected String |
pkUpdateString(String entName)
|
| Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator |
|---|
autoPkTableExists, binaryPK, dropAutoPkStatements, generatePk, generatePkForDbEntity, reset, runUpdate, setPkCacheSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FrontBasePkGenerator()
| Method Detail |
|---|
public int getPkCacheSize()
getPkCacheSize in class JdbcPkGenerator
public void createAutoPk(DataNode node,
List<DbEntity> dbEntities)
throws Exception
PkGenerator
createAutoPk in interface PkGeneratorcreateAutoPk in class JdbcPkGeneratornode - node that provides access to a DataSource.dbEntities - a list of entities that require primary key auto-generation
support
Exceptionpublic List<String> createAutoPkStatements(List<DbEntity> dbEntities)
PkGenerator
createAutoPkStatements in interface PkGeneratorcreateAutoPkStatements in class JdbcPkGenerator
public void dropAutoPk(DataNode node,
List<DbEntity> dbEntities)
throws Exception
JdbcPkGenerator
dropAutoPk in interface PkGeneratordropAutoPk in class JdbcPkGeneratornode - node that provides access to a DataSource.dbEntities - a list of entities whose primary key auto-generation support
should be dropped.
Exceptionprotected String pkTableCreateString()
pkTableCreateString in class JdbcPkGeneratorprotected String pkDeleteString(List<DbEntity> dbEntities)
pkDeleteString in class JdbcPkGeneratorprotected String pkCreateString(String entName)
pkCreateString in class JdbcPkGeneratorprotected String pkSelectString(String entName)
pkSelectString in class JdbcPkGeneratorprotected String pkUpdateString(String entName)
pkUpdateString in class JdbcPkGeneratorprotected String dropAutoPkString()
dropAutoPkString in class JdbcPkGenerator
protected long longPkFromDatabase(DataNode node,
DbEntity entity)
throws Exception
JdbcPkGeneratorThis method is called internally from "generatePkForDbEntity" and then generated range of key values is saved in cache for performance. Subclasses that implement different primary key generation solutions should override this method, not "generatePkForDbEntity".
longPkFromDatabase in class JdbcPkGeneratorException
protected int pkFromDatabase(DataNode node,
DbEntity entity)
throws Exception
JdbcPkGeneratorThis method is called internally from "generatePkForDbEntity" and then generated range of key values is saved in cache for performance. Subclasses that implement different primary key generation solutions should override this method, not "generatePkForDbEntity".
pkFromDatabase in class JdbcPkGeneratorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||