|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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. The AlphaNumericSequencer entity EJB is now a read only entity EJB, and as such, all getters have been deprecated. Each instance of an AlphaNumericSequencer initializes itself using properties found in the WebLogic Commerce property file. For an AlphaNumericSequencer with primary key SEQUENCER_PK, there are five properties that must be specified:
commerce.sequencer.SEQUENCER_PK.prefix Sequencer prefix string commerce.sequencer.SEQUENCER_PK.suffix Sequencer suffix string commerce.sequencer.SEQUENCER_PK.digits The minimum number of sequencer digits commerce.sequencer.SEQUENCER_PK.step The sequence step amount commerce.sequencer.SEQUENCER_PK.cacheSize The number of sequence numbers to allocate from the database
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
]
AlphaNumericSequencerPk
,
AlphaNumericSequencerHome
,
AlphaNumericSequencerImpl
,
AlphaNumericSequencerValue
Method Summary | |
AlphaNumericSequencerValue |
getAlphaNumericSequencerByValue()
Get all of AlphaNumericSequencer's attributes. |
int |
getCounter()
Deprecated. Replaced by getValue |
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)
Deprecated. Please see the WebLogic Commerce property file |
void |
setAlphaNumericSequencerByValue(AlphaNumericSequencerValue value)
Deprecated. Please see the WebLogic Commerce property file |
void |
setCounter(int counter)
Deprecated. Please see the WebLogic Commerce property file |
void |
setNumDigits(int numDigits)
Deprecated. Please see the WebLogic Commerce property file |
void |
setPrefix(java.lang.String prefix)
Deprecated. Please see the WebLogic Commerce property file |
void |
setStep(int step)
Deprecated. Please see the WebLogic Commerce property file |
void |
setSuffix(java.lang.String suffix)
Deprecated. Please see the WebLogic Commerce property file |
Methods inherited from interface javax.ejb.EJBObject |
getEJBHome,
getHandle,
getPrimaryKey,
isIdentical,
remove |
Method Detail |
public AlphaNumericSequencerValue getAlphaNumericSequencerByValue() throws java.rmi.RemoteException
public void setAlphaNumericSequencerByValue(AlphaNumericSequencerValue value) throws java.rmi.RemoteException
AlphaNumericSequencerValue
- the AlphaNumericSequencer value objectpublic java.lang.String getIdentifier() throws java.rmi.RemoteException
public java.lang.String getPrefix() throws java.rmi.RemoteException
public void setPrefix(java.lang.String prefix) throws java.rmi.RemoteException
prefixes
- prefix to be addedpublic int getNumDigits() throws java.rmi.RemoteException
public void setNumDigits(int numDigits) throws java.rmi.RemoteException
numDigitses
- numDigits to be addedpublic java.lang.String getSuffix() throws java.rmi.RemoteException
public void setSuffix(java.lang.String suffix) throws java.rmi.RemoteException
suffixes
- suffix to be addedpublic int getStep() throws java.rmi.RemoteException
public void setStep(int step) throws java.rmi.RemoteException
steps
- step to be addedpublic int getCounter() throws java.rmi.RemoteException
public void setCounter(int counter) throws java.rmi.RemoteException
counters
- counter to be addedpublic void initialize(java.lang.String prefix, int numDigits, java.lang.String suffix, int start, int step) throws java.rmi.RemoteException
public java.lang.String getNextValue() throws java.rmi.RemoteException
getValue()
public java.lang.String getValue() throws java.rmi.RemoteException
getNextValue()
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |