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

public Class Db2LuwMaxValueIncrementer

extends AbstractSequenceMaxValueIncrementer
Class Inheritance
Imports
javax.sql.DataSource

DataFieldMaxValueIncrementer that retrieves the next value of a given sequence on DB2 LUW (for Linux, Unix and Windows).

Thanks to Mark MacMahon for the suggestion!

Author
Juergen Hoeller
Since
4.3.15
See Also
Db2MainframeMaxValueIncrementer

Constructor Summary

AccessConstructor and Description
public
Db2LuwMaxValueIncrementer()

Default constructor for bean property style usage.

public
Db2LuwMaxValueIncrementer(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

Db2LuwMaxValueIncrementerback to summary
public Db2LuwMaxValueIncrementer()

Default constructor for bean property style usage.

See Also
setDataSource, setIncrementerName
Db2LuwMaxValueIncrementerback to summary
public Db2LuwMaxValueIncrementer(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