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

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

public class HighLowSequence
extends Object
implements Serializable

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

Version:
$Id: HighLowSequence.java,v 1.1 2007-08-24 22:17:29 ewestfal Exp $
See Also:
Serialized Form

Field Summary
protected  long curVal
           
 
Constructor Summary
HighLowSequence()
          Default constructor for the HighLowSequence object
HighLowSequence(String tableName, long maxKey, int grabSize, Integer version)
           
 
Method Summary
 HighLowSequence getCopy()
           
 int getGrabSize()
          Gets the grabSize attribute of the HighLowSequence object
 long getMaxKey()
          Gets the maxKey attribute of the HighLowSequence object
 String getName()
          Gets the name attribute of the HighLowSequence object
 long getNextId()
          Gets the next key from this sequence
 Integer getVersion()
           
 void grabNextKeySet()
          Grabs the next key set, the sequence must be saved afterwards!!
 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 setName(String name)
          Sets the name attribute of the HighLowSequence object
 void setVersion(Integer version)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

curVal

protected long curVal
Constructor Detail

HighLowSequence

public HighLowSequence()
Default constructor for the HighLowSequence object


HighLowSequence

public HighLowSequence(String tableName,
                       long maxKey,
                       int grabSize,
                       Integer version)
Method Detail

getCopy

public HighLowSequence getCopy()

toString

public String toString()
Overrides:
toString in class Object

getVersion

public Integer getVersion()

setVersion

public void setVersion(Integer version)

setName

public void setName(String name)
Sets the name attribute of the HighLowSequence object

Parameters:
name - 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

setMaxKey

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

Parameters:
maxKey - The new maxKey value

getName

public String getName()
Gets the name 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

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!!



Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.