public abstract class AbstractColumnMaxValueIncrementer extends AbstractDataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer implementations that use
a column in a custom sequence table. Subclasses need to provide the specific handling
of that table in their AbstractDataFieldMaxValueIncrementer.getNextKey() implementation.| Modifier and Type | Field and Description |
|---|---|
private int |
cacheSize
The number of keys buffered in a cache
|
private java.lang.String |
columnName
The name of the column for this sequence
|
paddingLength| Constructor and Description |
|---|
AbstractColumnMaxValueIncrementer()
Default constructor for bean property style usage.
|
AbstractColumnMaxValueIncrementer(javax.sql.DataSource dataSource,
java.lang.String incrementerName,
java.lang.String columnName)
Convenience constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
int |
getCacheSize()
Return the number of buffered keys.
|
java.lang.String |
getColumnName()
Return the name of the column in the sequence table.
|
void |
setCacheSize(int cacheSize)
Set the number of buffered keys.
|
void |
setColumnName(java.lang.String columnName)
Set the name of the column in the sequence table.
|
getDataSource, getIncrementerName, getNextKey, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLengthprivate java.lang.String columnName
private int cacheSize
public AbstractColumnMaxValueIncrementer()
public AbstractColumnMaxValueIncrementer(javax.sql.DataSource dataSource,
java.lang.String incrementerName,
java.lang.String columnName)
dataSource - the DataSource to useincrementerName - the name of the sequence/table to usecolumnName - the name of the column in the sequence table to usepublic void setColumnName(java.lang.String columnName)
public java.lang.String getColumnName()
public void setCacheSize(int cacheSize)
public int getCacheSize()
public void afterPropertiesSet()
InitializingBeanThis method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractDataFieldMaxValueIncrementer