|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.plugins.jaws.JAWSPersistenceManager
Just Another Web Store - an O/R mapper
Revisions:
20010812 vincent.harcq@hubmethods.com:
20011201 Dain Sundstrom:
20020525 Dain Sundstrom:
EntityPersistenceStore
Nested Class Summary | |
static class |
JAWSPersistenceManager.PersistenceContext
|
Constructor Summary | |
JAWSPersistenceManager()
|
Method Summary | |
void |
activateEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be activated. |
void |
create()
|
Object |
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class. |
Object |
createEntity(Method m,
Object[] args,
EntityEnterpriseContext ctx)
This method is called whenever an entity is to be created. |
void |
destroy()
|
Collection |
findEntities(Method finderMethod,
Object[] args,
EntityEnterpriseContext ctx,
GenericEntityObjectFactory factory)
This method is called when collections of entities are to be found. |
Object |
findEntity(Method finderMethod,
Object[] args,
EntityEnterpriseContext ctx,
GenericEntityObjectFactory factory)
This method is called when single entities are to be found. |
void |
initEntity(EntityEnterpriseContext ctx)
Reset all attributes to default value The EJB 1.1 specification is not entirely clear about this, the EJB 2.0 spec is, see page 169. |
boolean |
isModified(EntityEnterpriseContext ctx)
This method is used to determined whether the instance was modified. |
boolean |
isStoreRequired(EntityEnterpriseContext ctx)
This method is used to determine if an entity should be stored. |
void |
loadEntity(EntityEnterpriseContext ctx)
This method is called whenever an entity shall be load from the underlying storage. |
void |
passivateEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be passivate. |
Object |
postCreateEntity(Method m,
Object[] args,
EntityEnterpriseContext ctx)
This method is called after the createEntity. |
void |
removeEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be removed from the underlying storage. |
void |
setContainer(Container c)
This callback is set by the container so that the plugin may access it |
void |
start()
|
void |
stop()
|
void |
storeEntity(EntityEnterpriseContext ctx)
This method is called whenever an entity shall be stored to the underlying storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JAWSPersistenceManager()
Method Detail |
public void setContainer(Container c)
ContainerPlugin
setContainer
in interface ContainerPlugin
c
- The container using this plugin. This may be null if the
plugin is being disassociated from a container.public void create() throws Exception
create
in interface org.jboss.system.Service
Exception
public void start() throws Exception
start
in interface org.jboss.system.Service
Exception
public void stop()
stop
in interface org.jboss.system.Service
public void destroy()
destroy
in interface org.jboss.system.Service
public Object createBeanClassInstance() throws Exception
EntityPersistenceStore
createBeanClassInstance
in interface EntityPersistenceStore
Exception
public void initEntity(EntityEnterpriseContext ctx)
initEntity
in interface EntityPersistenceStore
ctx
- public Object createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws RemoteException, javax.ejb.CreateException
EntityPersistenceStore
createEntity
in interface EntityPersistenceStore
m
- the create method in the home interface that was
calledargs
- any create parametersctx
- the instance being used for this create call
RemoteException
javax.ejb.CreateException
public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception
postCreateEntity
in interface EntityPersistenceStore
m
- the ejbPostCreate method in the bean class that was
calledargs
- any create parametersctx
- the instance being used for this create call
Exception
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) throws Exception
EntityPersistenceStore
findEntity
in interface EntityPersistenceStore
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
Exception
public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) throws Exception
EntityPersistenceStore
findEntities
in interface EntityPersistenceStore
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
Exception
public void activateEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceStore
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.
activateEntity
in interface EntityPersistenceStore
ctx
- the instance to use for the activation
RemoteException
- thrown if some system exception occurspublic void loadEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceStore
loadEntity
in interface EntityPersistenceStore
ctx
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception
EntityPersistenceStore
isStoreRequired
in interface EntityPersistenceStore
ctx
- the instance to check
Exception
- thrown if some system exception occurspublic boolean isModified(EntityEnterpriseContext ctx) throws Exception
EntityPersistenceStore
isModified
in interface EntityPersistenceStore
ctx
-
Exception
public void storeEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceStore
storeEntity
in interface EntityPersistenceStore
ctx
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic void passivateEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceStore
See the activate discussion for the reason for exposing EJB callback calls to the store.
passivateEntity
in interface EntityPersistenceStore
ctx
- the instance to passivate
RemoteException
- thrown if some system exception occurspublic void removeEntity(EntityEnterpriseContext ctx) throws RemoteException, javax.ejb.RemoveException
EntityPersistenceStore
removeEntity
in interface EntityPersistenceStore
ctx
- the instance to remove
javax.ejb.RemoveException
- thrown if the instance could not be removed
RemoteException
- thrown if some system exception occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |