pt.jcodeutil.core.ejb.numbering.ent
Interface NumericSequencer

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface NumericSequencer
extends javax.ejb.EJBObject

EJB that represents a sequence identified by a key. Using this EJB we can get the next value, do a reset of the value or remove it.


Method Summary
 java.lang.String getKey()
          Get the key for this sequence.
 long getValue()
          Get the value for the sequence.
 long nextValue()
          Get the next value for the sequence.
 void setKey(java.lang.String key)
          Set the key for this sequence.
 void setValue(long value)
          Reset the value of the sequence for the given value.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

nextValue

public long nextValue()
               throws java.rmi.RemoteException
Get the next value for the sequence.
Returns:
the next value for the sequence.

getValue

public long getValue()
              throws java.rmi.RemoteException
Get the value for the sequence.
Returns:
the value for the sequence.

setValue

public void setValue(long value)
              throws java.rmi.RemoteException
Reset the value of the sequence for the given value.
Parameters:
value - value to be updated in the sequence

setKey

public void setKey(java.lang.String key)
Set the key for this sequence.
Parameters:
key - key to be set in this sequence.

getKey

public java.lang.String getKey()
Get the key for this sequence.
Returns:
the key for this sequence.