|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.text.ObjectIdGenerator
public class ObjectIdGenerator
Generates numeric IDs that are left padded with zeros.
| Constructor Summary | |
|---|---|
ObjectIdGenerator()
Initialize the new instance with default values. |
|
ObjectIdGenerator(int idLength)
Initialize the new instance with the length for the generated identifiers. |
|
ObjectIdGenerator(long startId,
int idLength)
Initialize the new instance with the length for the generated identifiers and the id to start with. |
|
| Method Summary | |
|---|---|
int |
getLength()
Returns the length to which the IDs are filled up |
char |
getPadChar()
Return the character that is used to fill up the IDs to the full length. |
java.lang.String |
getPrefix()
Returns the prefix that will be prepended to every generated ID. |
java.lang.String |
newIdentifier()
Returns a new unique identifier as string. |
long |
nextIdentifier()
Returns a new identifier which is different to the last one. |
void |
setLength(int newValue)
Set the length to which the IDs must be filled up with leading zeroes. |
void |
setPadChar(char fillChar)
Set the character that is used to fill up the IDs to the full length. |
void |
setPrefix(java.lang.String newValue)
Set the prefix that will be prepended to every generated ID. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectIdGenerator()
public ObjectIdGenerator(int idLength)
idLength - The length to which Ids are filled up with leading zeros (must be > 0)
public ObjectIdGenerator(long startId,
int idLength)
startId - The first id to be generatedidLength - The length to which Ids are filled up with leading zeros| Method Detail |
|---|
public java.lang.String newIdentifier()
newIdentifier in interface IObjectIdGeneratorpublic long nextIdentifier()
public int getLength()
public void setLength(int newValue)
newValue - The length (must be > 0)public void setPadChar(char fillChar)
fillChar - The fill characterpublic char getPadChar()
public java.lang.String getPrefix()
public void setPrefix(java.lang.String newValue)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||