public class JdbcSequentialPrimaryKeyPersistence extends Object implements SequentialPrimaryKeyPersistence
Primary key persistence that uses the Spring JDBC Template. <p> See http://forum.springsource.org/showthread.php?16594-PROPAGATION_NESTED-versus-PROPAGATION_REQUIRES_NEW.
| Constructor and Description | 
|---|
JdbcSequentialPrimaryKeyPersistence(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                   DataSource dataSource,
                                   DatabaseType databaseType,
                                   DatabaseMetadata databaseMetadata,
                                   String sqlMappingFile)
Creates a new JdbcSequentialPrimaryKeyPersistence instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
PrimaryKeyRange | 
getAvailablePrimaryKeys(int blockSize)
Generates a block of unique primary keys. 
 | 
public JdbcSequentialPrimaryKeyPersistence(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                           DataSource dataSource,
                                           DatabaseType databaseType,
                                           DatabaseMetadata databaseMetadata,
                                           String sqlMappingFile)
                                    throws Exception
Creates a new JdbcSequentialPrimaryKeyPersistence instance.
transactionManager - the transaction manager to applydataSource - the data source to applydatabaseType - the database type to apply when choosing the proper sql statementsdatabaseMetadata - the database meta datasqlMappingFile - the path to the primary key sql mapping fileException - thrown if something goes wrong during loading of the sql mapping resourcespublic PrimaryKeyRange getAvailablePrimaryKeys(int blockSize)
Generates a block of unique primary keys. Each range of returned primary keys must be higher than the range returned for the previous call.
getAvailablePrimaryKeys in interface SequentialPrimaryKeyPersistenceblockSize - the number of primary keys to fetchCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.