Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.support.incrementer
Class DB2MainframeSequenceMaxValueIncrementer

    java.lang.Object
      org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
          org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer
              org.springframework.jdbc.support.incrementer.DB2MainframeSequenceMaxValueIncrementer

All Implemented Interfaces:
  InitializingBean, DataFieldMaxValueIncrementer

    public class DB2MainframeSequenceMaxValueIncrementer

extends AbstractSequenceMaxValueIncrementer

`DataFieldMaxValueIncrementer` that retrieves the next value of a given sequence on DB2/390 or DB2/400. Thanks to Jens Eickmeyer for the suggestion!

Since:
  2.5.3
Author:
  Juergen Hoeller
See Also:
  `DB2SequenceMaxValueIncrementer`

Field Summary

Fields inherited from class org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
`paddingLength`

Constructor Summary
`DB2MainframeSequenceMaxValueIncrementer()` Default constructor for bean property style usage.
`DB2MainframeSequenceMaxValueIncrementer(javax.sql.DataSource dataSource, java.lang.String incrementerName)` Convenience constructor.

Method Summary
`protected java.lang.String` | `getSequenceQuery()` Return the database-specific query to use for retrieving a sequence value.

Methods inherited from class org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer
`getNextKey`

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

### DB2MainframeSequenceMaxValueIncrementer

    public DB2MainframeSequenceMaxValueIncrementer()

  Default constructor for bean property style usage.

  See Also:
    `AbstractDataFieldMaxValueIncrementer.setDataSource(javax.sql.DataSource)`, `AbstractDataFieldMaxValueIncrementer.setIncrementerName(java.lang.String)`

### DB2MainframeSequenceMaxValueIncrementer

    public DB2MainframeSequenceMaxValueIncrementer(javax.sql.DataSource dataSource,
                                                   java.lang.String incrementerName)

  Convenience constructor.

  Parameters:
    `dataSource` - the DataSource to use
    `incrementerName` - the name of the sequence/table to use

Method Detail

### getSequenceQuery

    protected java.lang.String getSequenceQuery()

  Description copied from class: `AbstractSequenceMaxValueIncrementer`
  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.

  Specified by:
    `getSequenceQuery` in class `AbstractSequenceMaxValueIncrementer`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD