|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.foundation.EntityImpl | +--com.beasys.commerce.axiom.util.AlphaNumericSequencerImpl
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 = com.beasys.commerce.axiom.util.AlphaNumericSequencerPk
AlphaNumericSequencer
,
AlphaNumericSequencerHome
,
AlphaNumericSequencerValue
, Serialized FormField Summary | |
int |
counter
Containment: By Value Multiplicity: 1:1 |
java.lang.String |
identifier
Containment: By Value Multiplicity: 1:1 PRIMARY KEY FIELD |
int |
numDigits
Containment: By Value Multiplicity: 1:1 |
java.lang.String |
prefix
Containment: By Value Multiplicity: 1:1 |
int |
step
Containment: By Value Multiplicity: 1:1 |
java.lang.String |
suffix
Containment: By Value Multiplicity: 1:1 |
Fields inherited from class com.beasys.commerce.foundation.EntityImpl |
__classIdentifier,
__containingEntity,
__mapKey,
__sequenceNumber,
_ctx,
_environmentNamingContext,
_environmentPropertyCache,
_isDirty,
_smartBMP |
Constructor Summary | |
AlphaNumericSequencerImpl()
|
Method Summary | |
protected void |
bscInitializeAttributes(AlphaNumericSequencerPk alphaNumericSequencerPk)
|
void |
ejbActivate()
ejbActivate method. |
AlphaNumericSequencerPk |
ejbCreate(AlphaNumericSequencerPk alphaNumericSequencerPk)
|
AlphaNumericSequencerPk |
ejbFindByPrimaryKey(AlphaNumericSequencerPk pk)
|
void |
ejbLoad()
ejbLoad method. |
void |
ejbPassivate()
ejbPassivate method. |
void |
ejbPostCreate(AlphaNumericSequencerPk alphaNumericSequencerPk)
|
void |
ejbRemove()
ejbRemove method. |
void |
ejbStore()
ejbStore method. |
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 |
setEntityContext(javax.ejb.EntityContext ctx)
setEntityContext method. |
void |
setIdentifier(java.lang.String value)
|
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 |
void |
unsetEntityContext()
unsetEntityContext method. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String identifier
public java.lang.String prefix
public int counter
public int step
public int numDigits
public java.lang.String suffix
Constructor Detail |
public AlphaNumericSequencerImpl()
Method Detail |
public AlphaNumericSequencerValue getAlphaNumericSequencerByValue()
public void setAlphaNumericSequencerByValue(AlphaNumericSequencerValue value)
AlphaNumericSequencerValue
- the AlphaNumericSequencer value objectpublic AlphaNumericSequencerPk ejbCreate(AlphaNumericSequencerPk alphaNumericSequencerPk) throws javax.ejb.CreateException
protected void bscInitializeAttributes(AlphaNumericSequencerPk alphaNumericSequencerPk) throws javax.ejb.CreateException
public void ejbPostCreate(AlphaNumericSequencerPk alphaNumericSequencerPk) throws javax.ejb.CreateException
public void ejbLoad() throws javax.ejb.EJBException
public void ejbStore() throws javax.ejb.EJBException
public void ejbRemove() throws javax.ejb.RemoveException
public void ejbActivate() throws javax.ejb.EJBException
public void ejbPassivate() throws javax.ejb.EJBException
public void setEntityContext(javax.ejb.EntityContext ctx) throws javax.ejb.EJBException
public void unsetEntityContext() throws javax.ejb.EJBException
public AlphaNumericSequencerPk ejbFindByPrimaryKey(AlphaNumericSequencerPk pk) throws javax.ejb.FinderException
public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- prefix to be addedpublic int getCounter()
public void setCounter(int counter)
counter
- counter to be addedpublic java.lang.String getIdentifier()
public void setIdentifier(java.lang.String value)
public int getStep()
public void setStep(int step)
step
- step to be addedpublic int getNumDigits()
public void setNumDigits(int numDigits)
numDigits
- numDigits to be addedpublic java.lang.String getSuffix()
public void setSuffix(java.lang.String suffix)
suffix
- suffix to be addedpublic void initialize(java.lang.String prefix, int numDigits, java.lang.String suffix, int start, int step) throws InvalidArgumentException
public java.lang.String getNextValue()
getValue()
public java.lang.String getValue()
getNextValue()
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |