org.pf.db.util
Class ObjectIdentifierGenerator
java.lang.Object
org.pf.text.ObjectIdGenerator
org.pf.db.util.ObjectIdentifierGenerator
- All Implemented Interfaces:
- IObjectIdGenerator, ObjectIdentifierProducer
- Direct Known Subclasses:
- ObjectIdentifierDB
public class ObjectIdentifierGenerator
- extends ObjectIdGenerator
- implements ObjectIdentifierProducer
This class provides identifiers by incrementing an internal counter,
starting at 1.
- Version:
- 1.5
- Author:
- Manfred Duchrow
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectIdentifierGenerator
public ObjectIdentifierGenerator()
- Initialize the new instance with default values.
That is an ID length of 10 and a start ID of 1.
ObjectIdentifierGenerator
public ObjectIdentifierGenerator(int idLength)
- Initialize the new instance with the length for the generated identifiers.
- Parameters:
idLength - The length to which Ids are filled up with leading zeros (must be > 0)
ObjectIdentifierGenerator
public ObjectIdentifierGenerator(long startId,
int idLength)
- Initialize the new instance with the length for the generated identifiers
and the id to start with.
- Parameters:
startId - The first id to be generatedidLength - The length to which Ids are filled up with leading zeros