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

public Class H2SequenceMaxValueIncrementer

extends AbstractSequenceMaxValueIncrementer
Class Inheritance
Imports
javax.sql.DataSource

DataFieldMaxValueIncrementer that retrieves the next value of a given H2 sequence.
Authors
Thomas Risberg, Henning Pöttker
Since
2.5

Constructor Summary

AccessConstructor and Description
public
H2SequenceMaxValueIncrementer()

Default constructor for bean property style usage.

public
H2SequenceMaxValueIncrementer(DataSource
the DataSource to use
dataSource
,
String
the name of the sequence/table to use
incrementerName
)

Convenience constructor.

Method Summary

Modifier and TypeMethod and Description
protected String
getSequenceQuery()

Implements abstract org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer.getSequenceQuery.

Return the database-specific query to use for retrieving a sequence value.
Inherited from org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer:
getNextKey

Constructor Detail

H2SequenceMaxValueIncrementerback to summary
public H2SequenceMaxValueIncrementer()

Default constructor for bean property style usage.

See Also
setDataSource, setIncrementerName
H2SequenceMaxValueIncrementerback to summary
public H2SequenceMaxValueIncrementer(DataSource dataSource, String incrementerName)

Convenience constructor.

Parameters
dataSource:DataSource

the DataSource to use

incrementerName:String

the name of the sequence/table to use

Method Detail

getSequenceQueryback to summary
protected String getSequenceQuery()

Implements abstract org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer.getSequenceQuery.

Doc from org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer.getSequenceQuery.

Return the database-specific query to use for retrieving a sequence value.

The provided SQL is supposed to result in a single row with a single column that allows for extracting a long value.

Annotations
@Override