| org.jboss.ejb.EntityPersistenceManager
All known Subclasses: org.jboss.ejb.plugins.BMPPersistenceManager, org.jboss.ejb.plugins.CMPPersistenceManager,
EntityPersistenceManager | public interface EntityPersistenceManager extends ContainerPlugin(Code) | | This interface is implemented by any EntityBean persistence managers plugins.
Implementations of this interface are called by other plugins in the
container. If the persistence manager wants to, it may attach any
instance specific metadata to the EntityEnterpriseContext that is
passed in method calls.
See Also: EntityContainer author: Rickard Öberg author: Dain Sundstrom version: $Revision: 57209 $ |
Method Summary | |
void | activateEntity(EntityEnterpriseContext instance) This method is called when an entity shall be activated. | Object | createBeanClassInstance() Returns a new instance of the bean class or a subclass of the bean class. | void | createEntity(Method m, Object[] args, EntityEnterpriseContext instance) This method is called whenever an entity is to be created. | Collection | findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) This method is called when collections of entities are to be found. | Object | findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) This method is called when single entities are to be found. | void | invokeEjbStore(EntityEnterpriseContext instance) Invokes ejbStore on the instance. | boolean | isModified(EntityEnterpriseContext ctx) This method is used to determined whether the instance was modified.
NOTE, even if the method returns true the isStoreRequired for this same instance
might return false, e.g. | boolean | isStoreRequired(EntityEnterpriseContext instance) This method is used to determine if an entity should be stored. | void | loadEntity(EntityEnterpriseContext instance) This method is called whenever an entity shall be load from the
underlying storage. | void | passivateEntity(EntityEnterpriseContext instance) This method is called when an entity shall be passivate. | void | postCreateEntity(Method m, Object[] args, EntityEnterpriseContext instance) This method is called whenever an entity is to be created. | void | removeEntity(EntityEnterpriseContext instance) This method is called when an entity shall be removed from the
underlying storage. | void | storeEntity(EntityEnterpriseContext instance) This method is called whenever an entity shall be stored to the
underlying storage. |
activateEntity | void activateEntity(EntityEnterpriseContext instance) throws RemoteException(Code) | | This method is called when an entity shall be activated. The persistence
manager must call the ejbActivate method on the instance.
Parameters: instance - the instance to use for the activation throws: RemoteException - thrown if some system exception occurs |
createBeanClassInstance | Object createBeanClassInstance() throws Exception(Code) | | Returns a new instance of the bean class or a subclass of the bean class.
the new instance |
createEntity | void createEntity(Method m, Object[] args, EntityEnterpriseContext instance) throws Exception(Code) | | This method is called whenever an entity is to be created. The
persistence manager is responsible for calling the ejbCreate method
on the instance and to handle the results properly wrt the persistent
store.
Parameters: m - the create method in the home interface that wascalled Parameters: args - any create parameters Parameters: instance - the instance being used for this create call |
findEntities | Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception(Code) | | This method is called when collections of entities are to be found. The
persistence manager must find out whether the wanted instances are
available in the persistence store, and if so it shall use the
EJBProxyFactory plugin to create EJBObjects to the instances, which are
to be returned as result.
Parameters: finderMethod - the find method in the home interface that wascalled Parameters: args - any finder parameters Parameters: instance - the instance to use for the finder call an EJBObject collection representing the foundentities |
findEntity | Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception(Code) | | This method is called when single entities are to be found. The
persistence manager must find out whether the wanted instance is
available in the persistence store, and if so it shall use the
EJBProxyFactory plugin to create an EJBObject to the instance, which
is to be returned as result.
Parameters: finderMethod - the find method in the home interface that wascalled Parameters: args - any finder parameters Parameters: instance - the instance to use for the finder call an EJBObject representing the found entity |
isModified | boolean isModified(EntityEnterpriseContext ctx) throws Exception(Code) | | This method is used to determined whether the instance was modified.
NOTE, even if the method returns true the isStoreRequired for this same instance
might return false, e.g. a CMR field that doesn't have a foreign key was modified.
Parameters: ctx - throws: Exception - |
isStoreRequired | boolean isStoreRequired(EntityEnterpriseContext instance) throws Exception(Code) | | This method is used to determine if an entity should be stored.
Parameters: instance - the instance to check true, if the entity has been modified throws: Exception - thrown if some system exception occurs |
loadEntity | void loadEntity(EntityEnterpriseContext instance) throws RemoteException(Code) | | This method is called whenever an entity shall be load from the
underlying storage. The persistence manager must load the state from
the underlying storage and then call ejbLoad on the supplied instance.
Parameters: instance - the instance to synchronize throws: RemoteException - thrown if some system exception occurs |
passivateEntity | void passivateEntity(EntityEnterpriseContext instance) throws RemoteException(Code) | | This method is called when an entity shall be passivate. The persistence
manager must call the ejbPassivate method on the instance.
Parameters: instance - the instance to passivate throws: RemoteException - thrown if some system exception occurs |
postCreateEntity | void postCreateEntity(Method m, Object[] args, EntityEnterpriseContext instance) throws Exception(Code) | | This method is called whenever an entity is to be created. The
persistence manager is responsible for calling the ejbPostCreate method
on the instance and to handle the results properly wrt the persistent
store.
Parameters: m - the create method in the home interface that wascalled Parameters: args - any create parameters Parameters: instance - the instance being used for this create call |
removeEntity | void removeEntity(EntityEnterpriseContext instance) throws RemoteException, RemoveException(Code) | | This method is called when an entity shall be removed from the
underlying storage. The persistence manager must call ejbRemove on the
instance and then remove its state from the underlying storage.
Parameters: instance - the instance to remove throws: RemoteException - thrown if some system exception occurs throws: RemoveException - thrown if the instance could not be removed |
storeEntity | void storeEntity(EntityEnterpriseContext instance) throws RemoteException(Code) | | This method is called whenever an entity shall be stored to the
underlying storage. The persistence manager must call ejbStore on the
supplied instance and then store the state to the underlying storage.
Parameters: instance - the instance to synchronize throws: RemoteException - thrown if some system exception occurs |
|
|