org.apache.ojb.broker.util.sequence
Class HighLowSequence

java.lang.Object
  extended byorg.apache.ojb.broker.util.sequence.HighLowSequence
All Implemented Interfaces:
java.io.Serializable

public class HighLowSequence
extends java.lang.Object
implements java.io.Serializable

The HighLowSequence is the persistent part of the SequenceManagerHighLowImpl. It makes the maximum reserved key persistently available.

Version:
$Id: HighLowSequence.java,v 1.8 2004/01/07 11:41:21 thma Exp $
See Also:
Serialized Form

Constructor Summary
HighLowSequence()
          Default constructor for the HighLowSequence object
HighLowSequence(java.lang.String tableName, java.lang.String fieldName, long maxKey, int grabSize, java.lang.Integer version)
           
 
Method Summary
 HighLowSequence getCopy()
           
 java.lang.String getFieldName()
          Gets the fieldName attribute of the HighLowSequence object
 int getGrabSize()
          Gets the grabSize attribute of the HighLowSequence object
 long getMaxKey()
          Gets the maxKey attribute of the HighLowSequence object
 long getNextId()
          Gets the next key from this sequence
 java.lang.String getTableName()
          Gets the className attribute of the HighLowSequence object
 java.lang.Integer getVersion()
           
 void grabNextKeySet()
          Grabs the next key set, the sequence must be saved afterwards!!
 void setFieldName(java.lang.String fieldName)
          Sets the fieldName attribute of the HighLowSequence object
 void setGrabSize(int grabSize)
          Sets the grab size attribute of the HighLowSequence object
 void setMaxKey(long maxKey)
          Sets the maxKey attribute of the HighLowSequence object
 void setTableName(java.lang.String tableName)
          Sets the className attribute of the HighLowSequence object
 void setVersion(java.lang.Integer version)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HighLowSequence

public HighLowSequence()
Default constructor for the HighLowSequence object


HighLowSequence

public HighLowSequence(java.lang.String tableName,
                       java.lang.String fieldName,
                       long maxKey,
                       int grabSize,
                       java.lang.Integer version)
Method Detail

getCopy

public HighLowSequence getCopy()

toString

public java.lang.String toString()

getVersion

public java.lang.Integer getVersion()

setVersion

public void setVersion(java.lang.Integer version)

setTableName

public void setTableName(java.lang.String tableName)
Sets the className attribute of the HighLowSequence object

Parameters:
tableName - The new className value

setGrabSize

public void setGrabSize(int grabSize)
Sets the grab size attribute of the HighLowSequence object

Parameters:
grabSize - The new grabSize value

setFieldName

public void setFieldName(java.lang.String fieldName)
Sets the fieldName attribute of the HighLowSequence object

Parameters:
fieldName - The new fieldName value

setMaxKey

public void setMaxKey(long maxKey)
Sets the maxKey attribute of the HighLowSequence object

Parameters:
maxKey - The new maxKey value

getTableName

public java.lang.String getTableName()
Gets the className attribute of the HighLowSequence object

Returns:
The className value

getGrabSize

public int getGrabSize()
Gets the grabSize attribute of the HighLowSequence object

Returns:
The grabSize value

getFieldName

public java.lang.String getFieldName()
Gets the fieldName attribute of the HighLowSequence object

Returns:
The fieldName value

getNextId

public long getNextId()
Gets the next key from this sequence

Returns:
The next key or 0 if sequence needs to grab new keyset

getMaxKey

public long getMaxKey()
Gets the maxKey attribute of the HighLowSequence object

Returns:
The maxKey value

grabNextKeySet

public void grabNextKeySet()
Grabs the next key set, the sequence must be saved afterwards!!



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14