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
public class FrontBasePkGenerator extends JdbcPkGenerator
- Since:
- 1.2
- 
Field SummaryFields inherited from class org.apache.cayenne.dba.JdbcPkGeneratoradapter, DEFAULT_PK_CACHE_SIZE, pkCache, pkCacheSize, pkStartValue
- 
Constructor SummaryConstructors Constructor Description FrontBasePkGenerator()Used by DIFrontBasePkGenerator(JdbcAdapter adapter)
- 
Method SummaryModifier and Type Method Description voidcreateAutoPk(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.voiddropAutoPk(DataNode node, List<DbEntity> dbEntities)Drops table named "AUTO_PK_SUPPORT" if it exists in the database.protected StringdropAutoPkString()intgetPkCacheSize()Returns zero as PK caching is not supported by FrontBaseAdapter.protected longlongPkFromDatabase(DataNode node, DbEntity entity)Performs primary key generation ignoring cache.protected StringpkCreateString(String entName)protected StringpkDeleteString(List<DbEntity> dbEntities)protected StringpkSelectString(String entName)protected StringpkTableCreateString()protected StringpkUpdateString(String entName)Methods inherited from class org.apache.cayenne.dba.JdbcPkGeneratorautoPkTableExists, dropAutoPkStatements, generatePk, getAdapter, reset, runUpdate, setAdapter, setPkCacheSize
- 
Constructor Details- 
FrontBasePkGeneratorpublic FrontBasePkGenerator()Used by DI- Since:
- 4.1
 
- 
FrontBasePkGenerator
 
- 
- 
Method Details- 
getPkCacheSizepublic int getPkCacheSize()Returns zero as PK caching is not supported by FrontBaseAdapter.- Overrides:
- getPkCacheSizein class- JdbcPkGenerator
 
- 
createAutoPkDescription copied from interface:PkGeneratorGenerates necessary database objects to provide automatic primary key support.- Specified by:
- createAutoPkin interface- PkGenerator
- Overrides:
- createAutoPkin class- JdbcPkGenerator
- Parameters:
- node- node that provides access to a DataSource.
- dbEntities- a list of entities that require primary key auto-generation support
- Throws:
- Exception
 
- 
createAutoPkStatementsDescription copied from interface:PkGeneratorReturns 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:
- createAutoPkStatementsin interface- PkGenerator
- Overrides:
- createAutoPkStatementsin class- JdbcPkGenerator
 
- 
dropAutoPkDescription copied from class:JdbcPkGeneratorDrops table named "AUTO_PK_SUPPORT" if it exists in the database.- Specified by:
- dropAutoPkin interface- PkGenerator
- Overrides:
- dropAutoPkin class- JdbcPkGenerator
- 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:
- pkTableCreateStringin class- JdbcPkGenerator
 
- 
pkDeleteString- Overrides:
- pkDeleteStringin class- JdbcPkGenerator
 
- 
pkCreateString- Overrides:
- pkCreateStringin class- JdbcPkGenerator
 
- 
pkSelectString- Overrides:
- pkSelectStringin class- JdbcPkGenerator
 
- 
pkUpdateString- Overrides:
- pkUpdateStringin class- JdbcPkGenerator
 
- 
dropAutoPkString- Overrides:
- dropAutoPkStringin class- JdbcPkGenerator
 
- 
longPkFromDatabaseDescription copied from class:JdbcPkGeneratorPerforms 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:
- longPkFromDatabasein class- JdbcPkGenerator
- Throws:
- Exception
- Since:
- 3.0
 
 
-