Class AbstractColumnMaxValueIncrementer
java.lang.Object
org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
org.springframework.jdbc.support.incrementer.AbstractColumnMaxValueIncrementer
- All Implemented Interfaces:
- InitializingBean,- DataFieldMaxValueIncrementer
- Direct Known Subclasses:
- AbstractIdentityColumnMaxValueIncrementer,- MySQLMaxValueIncrementer
public abstract class AbstractColumnMaxValueIncrementer
extends AbstractDataFieldMaxValueIncrementer
Abstract base class for 
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.- Since:
- 2.5.3
- Author:
- Juergen Hoeller
- 
Field SummaryFields inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementerpaddingLength
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor for bean property style usage.AbstractColumnMaxValueIncrementer(DataSource dataSource, String incrementerName, String columnName) Convenience constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.intReturn the number of buffered keys.Return the name of the column in the sequence table.voidsetCacheSize(int cacheSize) Set the number of buffered keys.voidsetColumnName(String columnName) Set the name of the column in the sequence table.Methods inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementergetDataSource, getIncrementerName, getNextKey, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLength
- 
Constructor Details- 
AbstractColumnMaxValueIncrementerpublic AbstractColumnMaxValueIncrementer()Default constructor for bean property style usage.
- 
AbstractColumnMaxValueIncrementerpublic AbstractColumnMaxValueIncrementer(DataSource dataSource, String incrementerName, String columnName) Convenience constructor.- Parameters:
- dataSource- the DataSource to use
- incrementerName- the name of the sequence/table to use
- columnName- the name of the column in the sequence table to use
 
 
- 
- 
Method Details- 
setColumnNameSet the name of the column in the sequence table.
- 
getColumnNameReturn the name of the column in the sequence table.
- 
setCacheSizepublic void setCacheSize(int cacheSize) Set the number of buffered keys.
- 
getCacheSizepublic int getCacheSize()Return the number of buffered keys.
- 
afterPropertiesSetpublic void afterPropertiesSet()Description copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. - Specified by:
- afterPropertiesSetin interface- InitializingBean
- Overrides:
- afterPropertiesSetin class- AbstractDataFieldMaxValueIncrementer
 
 
-