|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.betwixt.io.id.AbstractIDGenerator
Abstract superclass for IDGenerator implementations.
It implements the entire IDGenerator interface.
When nextId is called,
this class sets the LastId property (as well
as returning the value).
Subclasses should override nextIdImpl().
| Field Summary | |
private String |
lastId
Last ID returned |
| Constructor Summary | |
AbstractIDGenerator()
|
|
| Method Summary | |
String |
getLastId()
Gets last ID returned. |
String |
nextId()
Generate next ID. |
protected abstract String |
nextIdImpl()
Subclasses should provide an implementation for this method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private String lastId
ID returned
| Constructor Detail |
public AbstractIDGenerator()
| Method Detail |
public final String getLastId()
ID returned.
getLastId in interface IDGeneratorpublic final String nextId()
Generate next ID.
This method obtains the next ID from subclass
and then uses this to set the LastId property.
nextId in interface IDGeneratorprotected abstract String nextIdImpl()
ID
value (according to it's algorithm).
Setting the LastId property can be left to this class.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||