public interface PersistenceFactory
Interface for factories of objects that no implements Persistent and
must be supported by PersistenceManager.
This can be used when the objects to persist can't be created by empty constructor.
| Modifier and Type | Method and Description |
|---|---|
Object |
createFromState(PersistentState state)
Create an instance of the object represented by the state.
|
DynStruct |
getDefinition(String className)
Returns the associated definition to the java class name
|
List |
getDefinitions()
Return a List of the definition managed by this factory where the key is
className and value is definition |
String |
getDomainName()
Returns the domain name of the objects persisted by this factory.
|
String |
getDomainURL()
Returns the domain URL to use for the schema.
|
Class |
getManagedClass(Object object)
Return the class or interface the factory asociate to
the object.
|
Class |
getManagedClass(PersistentState state)
Return the class or interface the factory asociate to
the object.
|
Class |
getManagedClass(String name)
Return the class or interface the factory asociate to
the java class name.
|
List |
getManagedClasses()
Return the list of classes or interfaces managed by this
factory.
|
String |
getManagedClassName(Object object)
Return the name class or interface the factory asociate to
the object.
|
void |
loadFromState(PersistentState state,
Object object)
Load a instance of
classToUse from state data. |
boolean |
manages(Class theClass)
Informs if
theClass is managed by this factory. |
boolean |
manages(Object object)
Informs if
object is managed by this factory. |
boolean |
manages(PersistentState state)
Informs if this factory can recreate the object represented by
state. |
void |
saveToState(PersistentState state,
Object obj)
Fill
state with data to persist of obj. |
Object createFromState(PersistentState state) throws PersistenceException
loadFromState(PersistentState, Object) only create
the object.state - PersistenceExceptionvoid loadFromState(PersistentState state, Object object) throws PersistenceException
classToUse from state data.state - object - PersistenceExceptionvoid saveToState(PersistentState state, Object obj) throws PersistenceException
state with data to persist of obj.state - obj - PersistenceExceptionboolean manages(Object object)
object is managed by this factory.object - boolean manages(Class theClass)
theClass is managed by this factory.class - to check.boolean manages(PersistentState state)
state.object - List getDefinitions()
className and value is definitionDynStruct getDefinition(String className)
className - of a java ClassString getDomainName()
String getDomainURL()
List getManagedClasses()
Class getManagedClass(Object object)
object - String getManagedClassName(Object object)
object - Class getManagedClass(PersistentState state)
state -