DataFieldMaxValueIncrementer that delegates
to a single getNextKey template method that returns a long.
Uses longs for String values, padding with zeroes if required.
| Modifier and Type | Field and Description |
|---|---|
| private DataSource | |
| private String | incrementerName
The name of the sequence/table containing the sequence. |
| protected int | paddingLength
The length to which a string result should be pre-pended with zeroes. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | AbstractDataFieldMaxValueIncrementer(DataSource
the DataSource to use dataSource, String the name of the sequence/table to use incrementerName)Convenience constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. 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 DataSource | |
| public String | |
| protected abstract long | Returns: the key to use as a long. It will eventually be converted later in another format by the public concrete methods of this class.Determine the next key to use, as a long. |
| public int | |
| public int | nextIntValue()
Implements org. |
| public long | nextLongValue()
Implements org. |
| public String | nextStringValue()
Implements org. |
| public void | |
| public void | |
| public void | setPaddingLength(int paddingLength)
Set the padding length, i.e. the length to which a string result should be pre-pended with zeroes. |
| dataSource | back to summary |
|---|---|
| private DataSource dataSource | |
| incrementerName | back to summary |
|---|---|
| private String incrementerName The name of the sequence/table containing the sequence. | |
| paddingLength | back to summary |
|---|---|
| protected int paddingLength The length to which a string result should be pre-pended with zeroes. | |
| AbstractDataFieldMaxValueIncrementer | back to summary |
|---|---|
| public AbstractDataFieldMaxValueIncrementer() Default constructor for bean property style usage.
| |
| AbstractDataFieldMaxValueIncrementer | back to summary |
|---|---|
| public AbstractDataFieldMaxValueIncrementer(DataSource dataSource, String incrementerName) Convenience constructor.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| getDataSource | back to summary |
|---|---|
| public DataSource getDataSource() Return the data source to retrieve the value from. | |
| getIncrementerName | back to summary |
|---|---|
| public String getIncrementerName() Return the name of the sequence/table. | |
| getNextKey | back to summary |
|---|---|
| protected abstract long getNextKey() Determine the next key to use, as a long.
| |
| getPaddingLength | back to summary |
|---|---|
| public int getPaddingLength() Return the padding length for String values. | |
| nextIntValue | back to summary |
|---|---|
| public int nextIntValue() throws DataAccessException Implements org. Doc from org. Increment the data store field's max value as int.
| |
| nextLongValue | back to summary |
|---|---|
| public long nextLongValue() throws DataAccessException Implements org. Doc from org. Increment the data store field's max value as long.
| |
| nextStringValue | back to summary |
|---|---|
| public String nextStringValue() throws DataAccessException Implements org. Doc from org. Increment the data store field's max value as String.
| |
| setDataSource | back to summary |
|---|---|
| public void setDataSource(DataSource dataSource) Set the data source to retrieve the value from. | |
| setIncrementerName | back to summary |
|---|---|
| public void setIncrementerName(String incrementerName) Set the name of the sequence/table. | |
| setPaddingLength | back to summary |
|---|---|
| public void setPaddingLength(int paddingLength) Set the padding length, i.e. the length to which a string result should be pre-pended with zeroes. | |