Top Description Fields Constructors Methods
org.springframework.jdbc.support.incrementer

public abstract Class AbstractColumnMaxValueIncrementer

extends AbstractDataFieldMaxValueIncrementer
Class Inheritance
Known Direct Subclasses
org.springframework.jdbc.support.incrementer.AbstractIdentityColumnMaxValueIncrementer, org.springframework.jdbc.support.incrementer.MySQLMaxValueIncrementer
Imports
javax.sql.DataSource, org.springframework.util.Assert

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 getNextKey() implementation.
Author
Juergen Hoeller
Since
2.5.3

Field Summary

Modifier and TypeField and Description
private int
cacheSize

The number of keys buffered in a cache.

private String
columnName

The name of the column for this sequence.

Inherited from org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer:
paddingLength

Constructor Summary

AccessConstructor and Description
public
AbstractColumnMaxValueIncrementer()

Default constructor for bean property style usage.

public
AbstractColumnMaxValueIncrementer(DataSource
the DataSource to use
dataSource
,
String
the name of the sequence/table to use
incrementerName
,
String
the name of the column in the sequence table to use
columnName
)

Convenience constructor.

Method Summary

Modifier and TypeMethod and Description
public void
afterPropertiesSet()

Overrides org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer.afterPropertiesSet.

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

public int
getCacheSize()

Return the number of buffered keys.

public String
getColumnName()

Return the name of the column in the sequence table.

public void
setCacheSize(int cacheSize)

Set the number of buffered keys.

public void
setColumnName(String columnName)

Set the name of the column in the sequence table.

Inherited from org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer:
getDataSourcegetIncrementerNamegetNextKeygetPaddingLengthnextIntValuenextLongValuenextStringValuesetDataSourcesetIncrementerNamesetPaddingLength

Field Detail

cacheSizeback to summary
private int cacheSize

The number of keys buffered in a cache.

columnNameback to summary
private String columnName

The name of the column for this sequence.

Constructor Detail

AbstractColumnMaxValueIncrementerback to summary
public AbstractColumnMaxValueIncrementer()

Default constructor for bean property style usage.

See Also
setDataSource, setIncrementerName, setColumnName
AbstractColumnMaxValueIncrementerback to summary
public AbstractColumnMaxValueIncrementer(DataSource dataSource, String incrementerName, String columnName)

Convenience constructor.

Parameters
dataSource:DataSource

the DataSource to use

incrementerName:String

the name of the sequence/table to use

columnName:String

the name of the column in the sequence table to use

Method Detail

afterPropertiesSetback to summary
public void afterPropertiesSet()

Overrides org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer.afterPropertiesSet.

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Doc from org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

Annotations
@Override
getCacheSizeback to summary
public int getCacheSize()

Return the number of buffered keys.

getColumnNameback to summary
public String getColumnName()

Return the name of the column in the sequence table.

setCacheSizeback to summary
public void setCacheSize(int cacheSize)

Set the number of buffered keys.

setColumnNameback to summary
public void setColumnName(String columnName)

Set the name of the column in the sequence table.