public class HsqlSequenceMaxValueIncrementer extends AbstractSequenceMaxValueIncrementer
DataFieldMaxValueIncrementer
that retrieves the next value of a given HSQL sequence.
Thanks to Guillaume Bilodeau for the suggestion!
NOTE: This is an alternative to using a regular table to support generating unique keys that was necessary in previous versions of HSQL.
HsqlMaxValueIncrementer
paddingLength
Constructor and Description |
---|
HsqlSequenceMaxValueIncrementer()
Default constructor for bean property style usage.
|
HsqlSequenceMaxValueIncrementer(javax.sql.DataSource dataSource,
java.lang.String incrementerName)
Convenience constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getSequenceQuery()
Return the database-specific query to use for retrieving a sequence value.
|
getNextKey
afterPropertiesSet, getDataSource, getIncrementerName, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLength
public HsqlSequenceMaxValueIncrementer()
public HsqlSequenceMaxValueIncrementer(javax.sql.DataSource dataSource, java.lang.String incrementerName)
dataSource
- the DataSource to useincrementerName
- the name of the sequence/table to useprotected java.lang.String getSequenceQuery()
AbstractSequenceMaxValueIncrementer
The provided SQL is supposed to result in a single row with a single
column that allows for extracting a long
value.
getSequenceQuery
in class AbstractSequenceMaxValueIncrementer