bea Systems, Inc.

theory.smart.axiom.util
Interface AlphaNumericSequencer

All Known Subinterfaces:
AlphaNumericSequencerExtension

public interface AlphaNumericSequencer
extends Entity

This class generates sequential identifiers in a prescribed format.. The user of the classs can configure the starting number, prefix, suffix, and step. It is also possible to specify the width of the numeric component. The current sequence number is persisted and access to the counter is controlled so that uniqueness can be guaranteed across all users of a given sequencer. It is used to generate unique keys for entities such as accounts, users, and sessions.

 Primary Key = theory.smart.axiom.util.AlphaNumericSequencerPk
 
                  identifier
 [AlphaNumericSequencer] <*>------> [String] (Primary Key)

 
                  prefix
 [AlphaNumericSequencer] <*>------> [String] 

 
                  numDigits
 [AlphaNumericSequencer] <*>------> [int] 

 
                  suffix
 [AlphaNumericSequencer] <*>------> [String] 

 
                  step
 [AlphaNumericSequencer] <*>------> [int] 

 
                  counter
 [AlphaNumericSequencer] <*>------> [int] 

 

See Also:
AlphaNumericSequencerPk, AlphaNumericSequencerHome, AlphaNumericSequencerImpl, AlphaNumericSequencerValue

Method Summary
 AlphaNumericSequencerValue getAlphaNumericSequencerByValue()
          Get all of AlphaNumericSequencer's attributes.
 int getCounter()
          Get the value of counter
 java.lang.String getIdentifier()
           
 java.lang.String getNextValue()
          This method returns the next value of the AlphaNumericSequencer.
 int getNumDigits()
          Get the value of numDigits
 java.lang.String getPrefix()
          Get the value of prefix
 int getStep()
          Get the value of step
 java.lang.String getSuffix()
          Get the value of suffix
 java.lang.String getValue()
          This method returns the CURRENT value of the AlphaNumericSequencer.
 void initialize(java.lang.String prefix, int numDigits, java.lang.String suffix, int start, int step)
          This is a short cut to initialize the sequencer
 void setAlphaNumericSequencerByValue(AlphaNumericSequencerValue value)
          Set all of AlphaNumericSequencer's attributes to the passed in value.
 void setCounter(int counter)
          Set the value of counter
 void setNumDigits(int numDigits)
          Set the value of numDigits
 void setPrefix(java.lang.String prefix)
          Set the value of prefix
 void setStep(int step)
          Set the value of step
 void setSuffix(java.lang.String suffix)
          Set the value of suffix
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getAlphaNumericSequencerByValue

public AlphaNumericSequencerValue getAlphaNumericSequencerByValue()
                                                           throws java.rmi.RemoteException
Get all of AlphaNumericSequencer's attributes.
Returns:
AlphaNumericSequencerValue the AlphaNumericSequencer value object

setAlphaNumericSequencerByValue

public void setAlphaNumericSequencerByValue(AlphaNumericSequencerValue value)
                                     throws java.rmi.RemoteException
Set all of AlphaNumericSequencer's attributes to the passed in value. Note: Primary key attributes are not set.
Parameters:
AlphaNumericSequencerValue - the AlphaNumericSequencer value object

getIdentifier

public java.lang.String getIdentifier()
                               throws java.rmi.RemoteException

getPrefix

public java.lang.String getPrefix()
                           throws java.rmi.RemoteException
Get the value of prefix
Returns:
prefix.

setPrefix

public void setPrefix(java.lang.String prefix)
               throws java.rmi.RemoteException
Set the value of prefix
Parameters:
prefixes - prefix to be added

getNumDigits

public int getNumDigits()
                 throws java.rmi.RemoteException
Get the value of numDigits
Returns:
numDigits.

setNumDigits

public void setNumDigits(int numDigits)
                  throws java.rmi.RemoteException
Set the value of numDigits
Parameters:
numDigitses - numDigits to be added

getSuffix

public java.lang.String getSuffix()
                           throws java.rmi.RemoteException
Get the value of suffix
Returns:
suffix.

setSuffix

public void setSuffix(java.lang.String suffix)
               throws java.rmi.RemoteException
Set the value of suffix
Parameters:
suffixes - suffix to be added

getStep

public int getStep()
            throws java.rmi.RemoteException
Get the value of step
Returns:
step.

setStep

public void setStep(int step)
             throws java.rmi.RemoteException
Set the value of step
Parameters:
steps - step to be added

getCounter

public int getCounter()
               throws java.rmi.RemoteException
Get the value of counter
Returns:
counter.

setCounter

public void setCounter(int counter)
                throws java.rmi.RemoteException
Set the value of counter
Parameters:
counters - counter to be added

initialize

public void initialize(java.lang.String prefix,
                       int numDigits,
                       java.lang.String suffix,
                       int start,
                       int step)
                throws java.rmi.RemoteException
This is a short cut to initialize the sequencer

getNextValue

public java.lang.String getNextValue()
                              throws java.rmi.RemoteException
This method returns the next value of the AlphaNumericSequencer. The counter gets incremented.
See Also:
getValue()

getValue

public java.lang.String getValue()
                          throws java.rmi.RemoteException
This method returns the CURRENT value of the AlphaNumericSequencer.
See Also:
getNextValue()

bea Systems, Inc.

© Copyright 2000 bea Systems, Inc. All rights reserved.