|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.text.ObjectIdGenerator
org.pfsw.db.util.ObjectIdentifierGenerator
public class ObjectIdentifierGenerator
This class provides identifiers by incrementing an internal counter, starting at 1.
Field Summary |
---|
Fields inherited from class org.pfsw.text.ObjectIdGenerator |
---|
DEFAULT_LENGTH, DEFAULT_PAD_CHAR, DEFAULT_START_ID |
Constructor Summary | |
---|---|
ObjectIdentifierGenerator()
Initialize the new instance with default values. |
|
ObjectIdentifierGenerator(int idLength)
Initialize the new instance with the length for the generated identifiers. |
|
ObjectIdentifierGenerator(long startId,
int idLength)
Initialize the new instance with the length for the generated identifiers and the id to start with. |
Method Summary | |
---|---|
protected void |
setStartId(long startId)
|
Methods inherited from class org.pfsw.text.ObjectIdGenerator |
---|
generateString, generateString, getDefaultLength, getDefaultPadChar, getDefaultStartId, getFullLength, getLength, getNextId, getNextIdHolder, getPadChar, getPrefix, getPrefixLength, hasPadding, hasPrefix, leftPad, leftPad, newIdentifier, nextIdentifier, setLength, setNextId, setPadChar, setPrefix, str |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pfsw.db.util.ObjectIdentifierProducer |
---|
nextIdentifier |
Methods inherited from interface org.pfsw.bif.identifier.IObjectIdGenerator |
---|
newIdentifier |
Constructor Detail |
---|
public ObjectIdentifierGenerator()
public ObjectIdentifierGenerator(int idLength)
idLength
- The length to which Ids are filled up with leading zeros (must be > 0)public ObjectIdentifierGenerator(long startId, int idLength)
startId
- The first id to be generated.idLength
- The length to which Ids are filled up with leading zeros.Method Detail |
---|
protected void setStartId(long startId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |