public abstract class AbstractPersistentService extends AbstractService implements Persistent
Service
implementation which is also Persistent
.
The persistence is based on the service parameters, which are persisted by this implementation. Child implementation services must persist their own additional properties.
Constructor and Description |
---|
AbstractPersistentService()
Empty constructor to be used only for persistence purposes.
|
AbstractPersistentService(DynObject serviceParameters) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doLoadFromState(PersistentState state)
Set the state of the child class persistent attributes from the state
passed as parameter.
|
protected abstract void |
doSaveToState(PersistentState state)
Saves the internal state of the child class persistent attributes on the
provided PersistentState object.
|
protected abstract DynClass |
getServiceChildDynClass()
Return the
DynClass of the persisted attributes of the child
class. |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
getProvider, getProviderManager, getProviderServices, getServiceParameters, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getManager
public AbstractPersistentService()
public AbstractPersistentService(DynObject serviceParameters) throws ServiceException
ServiceException
AbstractService.AbstractService(DynObject).
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
protected abstract DynClass getServiceChildDynClass()
DynClass
of the persisted attributes of the child
class.DynClass
for persistence of the child service classprotected abstract void doLoadFromState(PersistentState state)
state
- to load the attribute values fromPersistent.loadFromState(PersistentState)
protected abstract void doSaveToState(PersistentState state)
state
- to save the attribute values to