Package org.apache.cayenne.dba.frontbase
Class FrontBasePkGenerator
java.lang.Object
org.apache.cayenne.dba.JdbcPkGenerator
org.apache.cayenne.dba.frontbase.FrontBasePkGenerator
- All Implemented Interfaces:
PkGenerator
- Since:
- 1.2
-
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 TypeMethodDescriptionvoid
createAutoPk
(DataNode node, List<DbEntity> dbEntities) Generates necessary database objects to provide automatic primary key support.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
int
Returns 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 String
pkSelectString
(String entName) protected String
protected String
pkUpdateString
(String entName) Methods inherited from class org.apache.cayenne.dba.JdbcPkGenerator
autoPkTableExists, dropAutoPkStatements, generatePk, getAdapter, reset, runUpdate, setAdapter, setPkCacheSize
-
Constructor Details
-
FrontBasePkGenerator
public FrontBasePkGenerator()Used by DI- Since:
- 4.1
-
FrontBasePkGenerator
-
-
Method Details
-
getPkCacheSize
public int getPkCacheSize()Returns zero as PK caching is not supported by FrontBaseAdapter.- Overrides:
getPkCacheSize
in classJdbcPkGenerator
-
createAutoPk
Description copied from interface:PkGenerator
Generates necessary database objects to provide automatic primary key support.- Specified by:
createAutoPk
in interfacePkGenerator
- Overrides:
createAutoPk
in classJdbcPkGenerator
- Parameters:
node
- node that provides access to a DataSource.dbEntities
- a list of entities that require primary key auto-generation support- Throws:
Exception
-
createAutoPkStatements
Description copied from interface:PkGenerator
Returns a list of SQL strings needed to generates database objects to provide automatic primary support for the list of entities. No actual database operations are performed.- Specified by:
createAutoPkStatements
in interfacePkGenerator
- Overrides:
createAutoPkStatements
in classJdbcPkGenerator
-
dropAutoPk
Description copied from class:JdbcPkGenerator
Drops table named "AUTO_PK_SUPPORT" if it exists in the database.- Specified by:
dropAutoPk
in interfacePkGenerator
- Overrides:
dropAutoPk
in classJdbcPkGenerator
- Parameters:
node
- node that provides access to a DataSource.dbEntities
- a list of entities whose primary key auto-generation support should be dropped.- Throws:
Exception
-
pkTableCreateString
- Overrides:
pkTableCreateString
in classJdbcPkGenerator
-
pkDeleteString
- Overrides:
pkDeleteString
in classJdbcPkGenerator
-
pkCreateString
- Overrides:
pkCreateString
in classJdbcPkGenerator
-
pkSelectString
- Overrides:
pkSelectString
in classJdbcPkGenerator
-
pkUpdateString
- Overrides:
pkUpdateString
in classJdbcPkGenerator
-
dropAutoPkString
- Overrides:
dropAutoPkString
in classJdbcPkGenerator
-
longPkFromDatabase
Description copied from class:JdbcPkGenerator
Performs primary key generation ignoring cache. Generates a range of primary keys as specified by "pkCacheSize" bean property.This 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".
- Overrides:
longPkFromDatabase
in classJdbcPkGenerator
- Throws:
Exception
- Since:
- 3.0
-