com.interface21.jdbc.core
Interface DataFieldMaxValueIncrementer

All Known Implementing Classes:
AbstractDataFieldMaxValueIncrementer

public interface DataFieldMaxValueIncrementer

Interface that defines contract of incrementing any data store field's maximum value. Works much like sequence number generator. Typical implementations could use RDBMS SQL and/or Stored Procedures to do the job.

History:

  • 17/04/2003 : donated to Spring by Dmitriy Kopylenko
  • 19/04/2003 : modified by Isabelle Muszynski, added nextDoubleValue
  • 09/05/2003 : modified by JPP, added nextLongValue

    Version:
    $Id: DataFieldMaxValueIncrementer.java,v 1.6 2003/06/10 17:50:26 dkopylenko Exp $
    Author:
    Dmitriy Kopylenko, Isabelle Muszynski, Jean-Pierre Pawlak

    Method Summary
     double nextDoubleValue()
              Increments data store field's max value as double
     int nextIntValue()
              Increments data store field's max value as int
     long nextLongValue()
              Increments data store field's max value as long
     java.lang.String nextStringValue()
              Increments data store field's max value as String
     java.lang.Object nextValue(java.lang.Class keyClass)
              Generic method to retrieve the next value.
     

    Method Detail

    nextIntValue

    public int nextIntValue()
                     throws DataAccessException
    Increments data store field's max value as int
    Returns:
    int next data store value such as max + 1
    Throws:
    DataAccessException -  

    nextLongValue

    public long nextLongValue()
                       throws DataAccessException
    Increments data store field's max value as long
    Returns:
    int next data store value such as max + 1
    Throws:
    DataAccessException -  

    nextDoubleValue

    public double nextDoubleValue()
                           throws DataAccessException
    Increments data store field's max value as double
    Returns:
    next data store value such as max + 1
    Throws:
    DataAccessException -  

    nextStringValue

    public java.lang.String nextStringValue()
                                     throws DataAccessException
    Increments data store field's max value as String
    Returns:
    next data store value such as max + 1
    Throws:
    DataAccessException -  

    nextValue

    public java.lang.Object nextValue(java.lang.Class keyClass)
                               throws DataAccessException
    Generic method to retrieve the next value. Legal values for keyClass are int.class, double.class, String.class, Integer.class and Double.class
    Throws:
    java.lang.IllegalArgumentException - if keyClass is not one of the expected types
    DataAccessException -  


    Rod Johnson and Spring contributors 2001-2003.