public interface JDBCEntityPersistenceStore
Modifier and Type | Method and Description |
---|---|
void |
activateEntity(CmpEntityBeanContext instance)
This method is called when an entity shall be activated.
|
void |
addCreateTable(String entityName) |
void |
addExistingTable(String entityName) |
Object |
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class.
|
Object |
createEntity(Method m,
Object[] args,
CmpEntityBeanContext instance)
This method is called whenever an entity is to be created.
|
Collection |
findEntities(Method finderMethod,
Object[] args,
CmpEntityBeanContext instance,
JDBCQueryCommand.EntityProxyFactory factory)
This method is called when collections of entities are to be found.
|
Object |
findEntity(Method finderMethod,
Object[] args,
CmpEntityBeanContext instance,
JDBCQueryCommand.EntityProxyFactory factory)
This method is called when single entities are to be found.
|
Catalog |
getCatalog() |
CmpConfig |
getCmpConfig() |
CmpEntityBeanComponent |
getComponent() |
DataSource |
getDataSource(String name) |
JDBCAbstractEntityBridge |
getEntityBridge() |
EntityBridgeInvocationHandler |
getInvocationHandler() |
JDBCTypeFactory |
getJDBCTypeFactory() |
KeyGeneratorFactory |
getKeyGeneratorFactory(String name) |
JDBCEntityMetaData |
getMetaData() |
boolean |
hasCreateTable(String entityName) |
void |
initEntity(CmpEntityBeanContext ctx)
Initializes the instance context.
|
boolean |
isModified(CmpEntityBeanContext instance)
This method is used to determined whether the instance was modified.
|
boolean |
isStoreRequired(CmpEntityBeanContext instance)
This method is used to determine if an entity should be stored.
|
void |
loadEntity(CmpEntityBeanContext instance)
This method is called whenever an entity shall be load from the
underlying storage.
|
void |
passivateEntity(CmpEntityBeanContext instance)
This method is called when an entity shall be passivate.
|
Object |
postCreateEntity(Method m,
Object[] args,
CmpEntityBeanContext instance)
This method is called after the createEntity.
|
void |
removeEntity(CmpEntityBeanContext instance)
This method is called when an entity shall be removed from the
underlying storage.
|
void |
storeEntity(CmpEntityBeanContext instance)
This method is called whenever an entity shall be stored to the
underlying storage.
|
Object createBeanClassInstance() throws Exception
Exception
void initEntity(CmpEntityBeanContext ctx)
This method is called before createEntity, and should resetStats the value of all cmpFields to 0 or null.
ctx
- Object createEntity(Method m, Object[] args, CmpEntityBeanContext instance) throws Exception
m
- the create method in the home interface that was
calledargs
- any create parametersinstance
- the instance being used for this create callException
Object postCreateEntity(Method m, Object[] args, CmpEntityBeanContext instance) throws Exception
m
- the ejbPostCreate method in the bean class that was
calledargs
- any create parametersinstance
- the instance being used for this create callException
Object findEntity(Method finderMethod, Object[] args, CmpEntityBeanContext instance, JDBCQueryCommand.EntityProxyFactory factory) throws Exception
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder callRemoteException
- thrown if some system exception occursException
- thrown if some heuristic problem occursCollection findEntities(Method finderMethod, Object[] args, CmpEntityBeanContext instance, JDBCQueryCommand.EntityProxyFactory factory) throws Exception
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder callRemoteException
- thrown if some system exception occursException
- thrown if some heuristic problem occursvoid activateEntity(CmpEntityBeanContext 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 activationRemoteException
- thrown if some system exception occursvoid loadEntity(CmpEntityBeanContext instance) throws RemoteException
instance
- the instance to synchronizeRemoteException
- thrown if some system exception occursboolean isStoreRequired(CmpEntityBeanContext instance) throws Exception
instance
- the instance to checkException
- thrown if some system exception occursboolean isModified(CmpEntityBeanContext instance) throws Exception
instance
- Exception
void storeEntity(CmpEntityBeanContext instance) throws RemoteException
instance
- the instance to synchronizeRemoteException
- thrown if some system exception occursvoid passivateEntity(CmpEntityBeanContext instance) throws RemoteException
See the activate discussion for the reason for exposing EJB callback calls to the store.
instance
- the instance to passivateRemoteException
- thrown if some system exception occursvoid removeEntity(CmpEntityBeanContext instance) throws RemoteException, javax.ejb.RemoveException
instance
- the instance to removeRemoteException
- thrown if some system exception occursjavax.ejb.RemoveException
- thrown if the instance could not be removedJDBCAbstractEntityBridge getEntityBridge()
JDBCEntityMetaData getMetaData()
JDBCTypeFactory getJDBCTypeFactory()
CmpEntityBeanComponent getComponent()
Catalog getCatalog()
CmpConfig getCmpConfig()
DataSource getDataSource(String name)
boolean hasCreateTable(String entityName)
void addCreateTable(String entityName)
void addExistingTable(String entityName)
EntityBridgeInvocationHandler getInvocationHandler()
KeyGeneratorFactory getKeyGeneratorFactory(String name)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.