public abstract class AbstractMultiPersistenceFactory extends Object implements PersistenceFactory
| Modifier and Type | Field and Description |
|---|---|
protected List |
classes |
protected List |
definitions |
protected Map |
nameToClass |
protected Map |
nameToDefinition |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMultiPersistenceFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected DynStruct |
addDefinition(Class managedClass,
String name,
String description) |
protected void |
addManagedClass(Class managedClass,
DynClass definition) |
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. |
protected abstract void |
makeDefinitions()
Create DynStruct definition and call to
#addDefinition(Class, DynStruct)
to add to the factory. |
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. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateFromState, saveToStateprotected List classes
protected List definitions
protected Map nameToDefinition
protected Map nameToClass
protected DynStruct addDefinition(Class managedClass, String name, String description)
public void loadFromState(PersistentState state, Object object) throws PersistenceException
PersistenceFactoryclassToUse from state data.loadFromState in interface PersistenceFactoryPersistenceExceptionpublic String getDomainName()
PersistenceFactorygetDomainName in interface PersistenceFactorypublic String getDomainURL()
PersistenceFactorygetDomainURL in interface PersistenceFactorypublic List getDefinitions()
PersistenceFactoryclassName and value is definitiongetDefinitions in interface PersistenceFactorypublic List getManagedClasses()
PersistenceFactorygetManagedClasses in interface PersistenceFactorypublic DynStruct getDefinition(String className)
PersistenceFactorygetDefinition in interface PersistenceFactoryclassName - of a java Classpublic boolean manages(Object object)
PersistenceFactoryobject is managed by this factory.manages in interface PersistenceFactorypublic boolean manages(Class theClass)
PersistenceFactorytheClass is managed by this factory.manages in interface PersistenceFactorypublic boolean manages(PersistentState state)
PersistenceFactorystate.manages in interface PersistenceFactorypublic Class getManagedClass(PersistentState state)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic Class getManagedClass(String name)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic Class getManagedClass(Object object)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic String getManagedClassName(Object object)
PersistenceFactorygetManagedClassName in interface PersistenceFactoryprotected abstract void makeDefinitions()
#addDefinition(Class, DynStruct)
to add to the factory.