|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by any EntityBean persistence Store.
These stores just deal with the persistence aspect of storing java objects. They need not be aware of the EJB semantics. They act as delegatees for the CMPEntityPersistenceManager class.
EntityPersistenceManager
Field Summary |
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. |
Object |
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 |
initEntity(EntityEnterpriseContext ctx)
Initializes the instance context. |
boolean |
isModified(EntityEnterpriseContext instance)
This method is used to determined whether the instance was modified. |
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. |
Object |
postCreateEntity(Method m,
Object[] args,
EntityEnterpriseContext instance)
This method is called after the createEntity. |
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. |
Methods inherited from interface org.jboss.ejb.ContainerPlugin |
setContainer |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Method Detail |
public Object createBeanClassInstance() throws Exception
Exception
public void initEntity(EntityEnterpriseContext ctx)
This method is called before createEntity, and should resetStats the value of all cmpFields to 0 or null.
ctx
- public Object createEntity(Method m, Object[] args, EntityEnterpriseContext instance) throws Exception
m
- the create method in the home interface that was
calledargs
- any create parametersinstance
- the instance being used for this create call
Exception
public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext instance) throws Exception
m
- the ejbPostCreate method in the bean class that was
calledargs
- any create parametersinstance
- the instance being used for this create call
Exception
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder call
RemoteException
- thrown if some system exception occurs
Exception
- thrown if some heuristic problem occurspublic Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder call
RemoteException
- thrown if some system exception occurs
Exception
- thrown if some heuristic problem occurspublic void activateEntity(EntityEnterpriseContext instance) throws RemoteException
With the PersistenceManager factorization most EJB calls should not exists However this calls permits us to introduce optimizations in the persistence store. Particularly the context has a "PersistenceContext" that a PersistenceStore can use (JAWS does for smart updates) and this is as good a callback as any other to set it up.
instance
- the instance to use for the activation
RemoteException
- thrown if some system exception occurspublic void loadEntity(EntityEnterpriseContext instance) throws RemoteException
instance
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic boolean isStoreRequired(EntityEnterpriseContext instance) throws Exception
instance
- the instance to check
Exception
- thrown if some system exception occurspublic boolean isModified(EntityEnterpriseContext instance) throws Exception
instance
-
Exception
public void storeEntity(EntityEnterpriseContext instance) throws RemoteException
instance
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic void passivateEntity(EntityEnterpriseContext instance) throws RemoteException
See the activate discussion for the reason for exposing EJB callback calls to the store.
instance
- the instance to passivate
RemoteException
- thrown if some system exception occurspublic void removeEntity(EntityEnterpriseContext instance) throws RemoteException, javax.ejb.RemoveException
instance
- the instance to remove
RemoteException
- thrown if some system exception occurs
javax.ejb.RemoveException
- thrown if the instance could not be removed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |