|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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| Field 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(com.beasys.commerce.axiom.util.EntityContext ctx)
|
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. |
| 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 object
public 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 com.beasys.commerce.foundation.EJBException
EntityImplejbLoad in class EntityImpl
public void ejbStore()
throws com.beasys.commerce.foundation.EJBException
EntityImplejbStore in class EntityImpl
public void ejbRemove()
throws <>RemoveException
EntityImplejbRemove in class EntityImpl
public void ejbActivate()
throws com.beasys.commerce.foundation.EJBException
EntityImplejbActivate in class EntityImpl
public void ejbPassivate()
throws com.beasys.commerce.foundation.EJBException
EntityImplejbPassivate in class EntityImpl
public void setEntityContext(com.beasys.commerce.axiom.util.EntityContext ctx)
throws com.beasys.commerce.foundation.EJBException
public void unsetEntityContext()
throws com.beasys.commerce.foundation.EJBException
EntityImplunsetEntityContext in class EntityImpl
public AlphaNumericSequencerPk ejbFindByPrimaryKey(AlphaNumericSequencerPk pk)
throws <>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 added
public void initialize(java.lang.String prefix,
int numDigits,
java.lang.String suffix,
int start,
int step)
throws InvalidArgumentException
InvalidArgumentException - If either the suffix or the prefix string is nullpublic java.lang.String getNextValue()
getValue()public java.lang.String getValue()
getNextValue()
|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||