|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.io.id.AbstractIDGenerator
public abstract class 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()
.
Constructor Summary | |
---|---|
AbstractIDGenerator()
|
Method Summary | |
---|---|
java.lang.String |
getLastId()
Gets last ID returned. |
java.lang.String |
nextId()
Generate next ID . |
protected abstract java.lang.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 |
Constructor Detail |
---|
public AbstractIDGenerator()
Method Detail |
---|
public final java.lang.String getLastId()
ID
returned.
getLastId
in interface IDGenerator
public final java.lang.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 IDGenerator
protected abstract java.lang.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 |