public abstract class AbstractIDGenerator extends Object implements IDGenerator
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 and Description |
|---|
AbstractIDGenerator() |
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.Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.