org.springframework.jdbc.support.incrementer
Class AbstractSequenceMaxValueIncrementer

java.lang.Object
  extended by org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
      extended by org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer
All Implemented Interfaces:
InitializingBean, DataFieldMaxValueIncrementer
Direct Known Subclasses:
DB2SequenceMaxValueIncrementer, OracleSequenceMaxValueIncrementer, PostgreSQLSequenceMaxValueIncrementer

public abstract class AbstractSequenceMaxValueIncrementer
extends AbstractDataFieldMaxValueIncrementer

Abstract base class for incrementers that use a database sequence. Subclasses need to provide the database-specific SQL to use.

Since:
26.02.2004
Author:
Juergen Hoeller
See Also:
getSequenceQuery()

Field Summary
 
Fields inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
paddingLength
 
Constructor Summary
AbstractSequenceMaxValueIncrementer()
           
 
Method Summary
protected  long getNextKey()
          Determine the next key to use, as a long.
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

AbstractSequenceMaxValueIncrementer

public AbstractSequenceMaxValueIncrementer()
Method Detail

getNextKey

protected long getNextKey()
                   throws DataAccessException
Description copied from class: AbstractDataFieldMaxValueIncrementer
Determine the next key to use, as a long.

Specified by:
getNextKey in class AbstractDataFieldMaxValueIncrementer
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.
Throws:
DataAccessException

getSequenceQuery

protected abstract String getSequenceQuery()
Return the database-specific query to use for retrieving a sequence value.



Copyright (c) 2002-2007 The Spring Framework Project.