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 |
---|---|
java.lang.Object |
createFromState(PersistentState state)
Create an instance of the object represented by the state.
|
DynStruct |
getDefinition(java.lang.String className)
Returns the associated definition to the java class name
|
java.util.List |
getDefinitions()
Return a List of the definition managed by this factory where the key is
className and value is definition |
java.lang.String |
getDomainName()
Returns the domain name of the objects persisted by this factory.
|
java.lang.String |
getDomainURL()
Returns the domain URL to use for the schema.
|
java.lang.Class |
getManagedClass(java.lang.Object object)
Return the class or interface the factory asociate to
the object.
|
java.lang.Class |
getManagedClass(PersistentState state)
Return the class or interface the factory asociate to
the object.
|
java.lang.Class |
getManagedClass(java.lang.String name)
Return the class or interface the factory asociate to
the java class name.
|
java.util.List |
getManagedClasses()
Return the list of classes or interfaces managed by this
factory.
|
java.lang.String |
getManagedClassName(java.lang.Object object)
Return the name class or interface the factory asociate to
the object.
|
void |
loadFromState(PersistentState state,
java.lang.Object object)
Load a instance of
classToUse from state data. |
boolean |
manages(java.lang.Class theClass)
Informs if
theClass is managed by this factory. |
boolean |
manages(java.lang.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,
java.lang.Object obj)
Fill
state with data to persist of obj . |
java.lang.Object createFromState(PersistentState state) throws PersistenceException
loadFromState(PersistentState, Object)
only create
the object.state
- PersistenceException
void loadFromState(PersistentState state, java.lang.Object object) throws PersistenceException
classToUse
from state
data.state
- object
- PersistenceException
void saveToState(PersistentState state, java.lang.Object obj) throws PersistenceException
state
with data to persist of obj
.state
- obj
- PersistenceException
boolean manages(java.lang.Object object)
object
is managed by this factory.object
- boolean manages(java.lang.Class theClass)
theClass
is managed by this factory.class
- to check.boolean manages(PersistentState state)
state
.object
- java.util.List getDefinitions()
className
and value is definition
DynStruct getDefinition(java.lang.String className)
className
- of a java Classjava.lang.String getDomainName()
java.lang.String getDomainURL()
java.util.List getManagedClasses()
java.lang.Class getManagedClass(java.lang.Object object)
object
- java.lang.String getManagedClassName(java.lang.Object object)
object
- java.lang.Class getManagedClass(PersistentState state)
state
- java.lang.Class getManagedClass(java.lang.String name)
name
-