public abstract class IdGenerator extends Object
Constructor and Description |
---|
IdGenerator()
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getNewId(Form form)
Provides a new id value to the calling form
i.e. :
- initialises the generator
- loads the current id stored - generates a new id value depending on the current value - stores the new id value - return the new id value |
protected abstract void |
init(Form form)
This method is called by getNewId to initialise the settings
needed by loadId and storeId
|
protected abstract String |
loadId()
Returns the current stored id
|
protected abstract void |
storeId(String strId)
Stores a new id
|
protected abstract String |
updateId(Form form,
String strCurrentId)
This method is the one responsible of generating a new id dependind on the
previous id's value
|
protected abstract void init(Form form)
form
- the form calling the generatorprotected abstract String loadId()
protected abstract void storeId(String strId)
strId
- the id to storeprotected abstract String updateId(Form form, String strCurrentId)
form
- the form calling the idgeneratorstrCurrentId
- the current value of the idpublic String getNewId(Form form)
form
- the calling formCopyright © 2016 Mairie de Paris. All Rights Reserved.