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

public Class SqlServerSequenceMaxValueIncrementer

extends AbstractSequenceMaxValueIncrementer
Class Inheritance
Imports
javax.sql.DataSource

DataFieldMaxValueIncrementer that retrieves the next value of a given SQL Server sequence.
Author
Mahmoud Ben Hassine
Since
6.0

Constructor Summary

AccessConstructor and Description
public
SqlServerSequenceMaxValueIncrementer()

Default constructor for bean property style usage.

public
SqlServerSequenceMaxValueIncrementer(DataSource
the DataSource to use
dataSource
,
String
the name of the sequence 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

SqlServerSequenceMaxValueIncrementerback to summary
public SqlServerSequenceMaxValueIncrementer()

Default constructor for bean property style usage.

See Also
setDataSource, setIncrementerName
SqlServerSequenceMaxValueIncrementerback to summary
public SqlServerSequenceMaxValueIncrementer(DataSource dataSource, String incrementerName)

Convenience constructor.

Parameters
dataSource:DataSource

the DataSource to use

incrementerName:String

the name of the sequence 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