public class DBMultiCategoryIdGeneratorBuilder
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
DBMultiCategoryIdGeneratorBuilder(javax.sql.DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
DBMultiCategoryIdGeneratorBuilder |
add(java.lang.String categoryName,
long startId)
Add a category with an ID producer using the given startId.
|
DBMultiCategoryIdGeneratorBuilder |
add(java.lang.String categoryName,
long startId,
int blockSize)
Add a category with an ID producer using the given startId and blockSize.
|
DBMultiCategoryIdGeneratorBuilder |
add(java.lang.String categoryName,
long startId,
int blockSize,
int length)
Add a category with an ID producer using the given startId and blockSize and length.
|
DBMultiCategoryIdGeneratorBuilder |
addCategories(IdGeneratorCategorySpec... specifications)
Adds the categories with ID producers according to the given specs.
|
DBMultiCategoryIdGeneratorBuilder |
addCategories(java.lang.String... categoryNames)
Adds the given category names for which to register an ID producer.
|
MultiCategoryIdentifierGenerator |
build() |
static DBMultiCategoryIdGeneratorBuilder |
create(javax.sql.DataSource dataSource) |
static DBMultiCategoryIdGeneratorBuilder |
create(javax.sql.DataSource dataSource,
IdGeneratorTableSpec tableSpec) |
protected java.util.List<IdGeneratorCategorySpec> |
getCategorySpecs() |
protected javax.sql.DataSource |
getDataSource() |
protected DefaultMultiCategoryIdentifierGenerator |
getMultiCategoryIdGenerator() |
protected IdGeneratorTableSpec |
getTableSpec() |
protected boolean |
isNewCategory(java.lang.String categoryName)
Returns true if no category with the given name has yet been registered.
|
protected boolean |
isTableAlreadyCreated() |
protected void |
regsiterIdGenerator(IdGeneratorCategorySpec categorySpec) |
protected void |
setTableAlreadyCreated(boolean isTableCreated) |
protected void |
setTableSpec(IdGeneratorTableSpec tableSpec) |
DBMultiCategoryIdGeneratorBuilder |
tableAlreadyCreated()
Invoke this method to signal that the table has been already created in the database.
|
DBMultiCategoryIdGeneratorBuilder |
tableSpec(IdGeneratorTableSpec tableSpecification)
If the default table or column names are not acceptable, specify here
the names to be used.
|
protected DBMultiCategoryIdGeneratorBuilder(javax.sql.DataSource dataSource)
public static DBMultiCategoryIdGeneratorBuilder create(javax.sql.DataSource dataSource)
public static DBMultiCategoryIdGeneratorBuilder create(javax.sql.DataSource dataSource, IdGeneratorTableSpec tableSpec)
public DBMultiCategoryIdGeneratorBuilder add(java.lang.String categoryName, long startId)
public DBMultiCategoryIdGeneratorBuilder add(java.lang.String categoryName, long startId, int blockSize)
public DBMultiCategoryIdGeneratorBuilder add(java.lang.String categoryName, long startId, int blockSize, int length)
public DBMultiCategoryIdGeneratorBuilder addCategories(java.lang.String... categoryNames)
public DBMultiCategoryIdGeneratorBuilder addCategories(IdGeneratorCategorySpec... specifications)
public DBMultiCategoryIdGeneratorBuilder tableSpec(IdGeneratorTableSpec tableSpecification)
public DBMultiCategoryIdGeneratorBuilder tableAlreadyCreated()
public MultiCategoryIdentifierGenerator build()
protected void regsiterIdGenerator(IdGeneratorCategorySpec categorySpec)
protected boolean isNewCategory(java.lang.String categoryName)
protected javax.sql.DataSource getDataSource()
protected IdGeneratorTableSpec getTableSpec()
protected void setTableSpec(IdGeneratorTableSpec tableSpec)
protected java.util.List<IdGeneratorCategorySpec> getCategorySpecs()
protected DefaultMultiCategoryIdentifierGenerator getMultiCategoryIdGenerator()
protected boolean isTableAlreadyCreated()
protected void setTableAlreadyCreated(boolean isTableCreated)