|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer
public abstract class AbstractSequenceMaxValueIncrementer
Abstract base class for DataFieldMaxValueIncrementer
implementations that use
a database sequence. Subclasses need to provide the database-specific SQL to use.
getSequenceQuery()
Field Summary |
---|
Fields inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer |
---|
paddingLength |
Constructor Summary | |
---|---|
AbstractSequenceMaxValueIncrementer()
Default constructor for bean property style usage. |
|
AbstractSequenceMaxValueIncrementer(DataSource dataSource,
String incrementerName)
Convenience constructor. |
Method Summary | |
---|---|
protected long |
getNextKey()
Executes the SQL as specified by getSequenceQuery() . |
protected abstract String |
getSequenceQuery()
Return the database-specific query to use for retrieving a sequence value. |
Methods inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer |
---|
afterPropertiesSet, getDataSource, getIncrementerName, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLength |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSequenceMaxValueIncrementer()
AbstractDataFieldMaxValueIncrementer.setDataSource(javax.sql.DataSource)
,
AbstractDataFieldMaxValueIncrementer.setIncrementerName(java.lang.String)
public AbstractSequenceMaxValueIncrementer(DataSource dataSource, String incrementerName)
dataSource
- the DataSource to useincrementerName
- the name of the sequence/table to useMethod Detail |
---|
protected long getNextKey() throws DataAccessException
getSequenceQuery()
.
getNextKey
in class AbstractDataFieldMaxValueIncrementer
DataAccessException
protected abstract String getSequenceQuery()
The provided SQL is supposed to result in a single row with a single
column that allows for extracting a long
value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |