|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.compatibility.base.marshalling.CachingMarshaller
org.openmdx.base.accessor.generic.view.Manager_1
public class Manager_1
Manager_1 implementation.
The manager returns the same object for a given object id as long as it is not garbage collected.
A Manager can be constructed with the following transaction management policies:
| Field Summary |
|---|
| Fields inherited from class org.openmdx.compatibility.base.marshalling.CachingMarshaller |
|---|
mapping |
| Constructor Summary | |
|---|---|
Manager_1(Connection_1_0 interaction)
Constructs a Manager. |
|
| Method Summary | |
|---|---|
void |
close()
Close the basic accessor. |
protected Object |
createMarshalledObject(Object source)
Marshals path objects to Object_1_0 objects. |
Object_1_0 |
createObject(String objectClass)
Create an object |
Object_1_0 |
createObject(String objectClass,
Object_1_0 initialValues)
This method creates a new object with the initial values. |
Object_1_0 |
createObject(String roleClass,
String roleId,
Object_1_0 roleCapable)
This method creates a new role of a RoleCapable object. |
Structure_1_0 |
createStructure(String type,
List fieldNames,
List fieldValues)
Create a structure |
Connection_1_0 |
getConnection()
Return connection assigned to this manager. |
Connection_1Factory |
getConnectionFactory()
Return this connection's factory |
Object_1_0 |
getObject(Object accessPath)
Get an object from the object factory. |
UnitOfWork_1_0 |
getUnitOfWork()
Return the unit of work associated with the current basic accessor. |
Boolean |
hasContainerManagedUnitOfWork()
Container managed units of work are either non transactional or part of a bigger unit of work. |
Object |
marshal(Object source)
Marshals an object |
void |
postLoad(InstanceCallbackEvent event)
Called after the values are loaded from the data store into this instance. |
void |
preClear(InstanceCallbackEvent event)
Called before the values in the instance are cleared. |
void |
preDelete(InstanceCallbackEvent event)
Called before the instance is deleted. |
void |
preStore(InstanceCallbackEvent event)
Called before the values are stored from this instance. |
Object |
unmarshal(Object source)
Unmarshals an object |
| Methods inherited from class org.openmdx.compatibility.base.marshalling.CachingMarshaller |
|---|
cache, clear, evict |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Manager_1(Connection_1_0 interaction)
throws ServiceException
interaction - the interaction object to be used by this manager
ServiceException| Method Detail |
|---|
public Connection_1_0 getConnection()
public Connection_1Factory getConnectionFactory()
ObjectFactory_1_2
getConnectionFactory in interface ObjectFactory_1_2public Boolean hasContainerManagedUnitOfWork()
hasContainerManagedUnitOfWork in interface ObjectFactory_1_2
public void close()
throws ServiceException
After the close method completes, all methods on the ObjectFactory_1_0 instance except isClosed throw a ILLEGAL_STATE RuntimeServiceException.
close in interface ObjectFactory_1_0ServiceException
public UnitOfWork_1_0 getUnitOfWork()
throws ServiceException
getUnitOfWork in interface ObjectFactory_1_0ServiceException - ILLEGAL_STATE
if the object factory is closed
public Object_1_0 getObject(Object accessPath)
throws ServiceException
If an object with the given acess path is already in the cache it is returned, otherwise a new object is returned.
getObject in interface ObjectFactory_1_0accessPath - Access path of object to be retrieved.
ServiceException - ILLEGAL_STATE
if the object factory is closed
public Object_1_0 createObject(String objectClass)
throws ServiceException
createObject in interface ObjectFactory_1_0objectClass - The model class of the object to be created
ServiceException - ILLEGAL_STATE
if the object factory is closed
public Structure_1_0 createStructure(String type,
List fieldNames,
List fieldValues)
throws ServiceException
createStructure in interface ObjectFactory_1_0type - The type of the structure to be createdfieldNames - The names of the structure's fieldsfieldValues - The structure's field values
ServiceException - ILLEGAL_STATE
if the object factory is closed
public Object_1_0 createObject(String objectClass,
Object_1_0 initialValues)
throws ServiceException
This method method and its org::openmdx::compatibility::role1 model are deprecated in favour of the org::openmdx::base::RoleCapable class and the $link{ObjectFactory_1_1#createObject(java.lang.String, java.lang.String,Object_1_0) createObject(String,String,Object_1_0)} method.
createObject in interface ObjectFactory_1_0createObject in interface ObjectFactory_1_1ServiceExceptionRole
public Object_1_0 createObject(String roleClass,
String roleId,
Object_1_0 roleCapable)
throws ServiceException
createObject in interface ObjectFactory_1_1ServiceExceptionRoleCapable
protected Object createMarshalledObject(Object source)
throws ServiceException
createMarshalledObject in class CachingMarshallersource - The object to be marshalled
RuntimeServiceException - DATA_CONVERSION: Object can't be marshalled
ServiceException - MARSHAL_FAILURE
Object can't be marshalled
public Object marshal(Object source)
throws ServiceException
marshal in interface Marshallermarshal in class CachingMarshallersource - The object to be marshalled
ServiceException - Object can't be marshalled
public Object unmarshal(Object source)
throws ServiceException
unmarshal in interface Marshallerunmarshal in class CachingMarshallersource - The marshalled object
ServiceException - Object can't be unmarshalled
public void postLoad(InstanceCallbackEvent event)
throws ServiceException
InstanceCallbackListenerDerived fields should be initialized in this method. The context in which this call is made does not allow access to other persistent Object_1_0 instances.
postLoad in interface InstanceCallbackListenerevent - the instance callback event
ServiceException - in case of failureInstanceCallbackEvent.POST_LOAD
public void preClear(InstanceCallbackEvent event)
throws ServiceException
InstanceCallbackListenerTransient fields should be cleared in this method. Associations between this instance and others in the runtime environment should be cleared.
preClear in interface InstanceCallbackListenerevent - the instance callback event
ServiceException - in case of failureInstanceCallbackEvent.PRE_CLEAR
public void preDelete(InstanceCallbackEvent event)
throws ServiceException
InstanceCallbackListener
preDelete in interface InstanceCallbackListenerevent - the instance callback event
ServiceException - in case of failure or vetoInstanceCallbackEvent.PRE_DELETE
public void preStore(InstanceCallbackEvent event)
throws ServiceException
InstanceCallbackListenerFields that might have been affected by modified non-persistent fields should be updated in this method.
The context in which this call is made allows access to the ObjectFactory_1_0 instance and other persistent Object_1_0 instances.
preStore in interface InstanceCallbackListenerevent - the instance callback event
ServiceException - in case of failure or vetoInstanceCallbackEvent.PRE_STORE
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||