|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.plugins.cmp.jdbc2.JDBCStoreManager2
Field Summary |
Constructor Summary | |
JDBCStoreManager2()
|
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 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. |
Object |
getApplicationData(Object key)
|
Catalog |
getCatalog()
|
EntityContainer |
getContainer()
|
JDBCAbstractEntityBridge |
getEntityBridge()
|
JDBCTypeFactory |
getJDBCTypeFactory()
|
JDBCEntityMetaData |
getMetaData()
|
QueryFactory |
getQueryFactory()
|
Schema |
getSchema()
|
void |
initEntity(EntityEnterpriseContext ctx)
Initializes the instance context. |
protected void |
initStoreManager()
|
boolean |
isCascadeDeleted(Object key)
|
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 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 |
putApplicationData(Object key,
Object value)
|
boolean |
registerCascadeDelete(Object key,
Object value)
|
void |
removeEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be removed from the underlying storage. |
void |
setContainer(Container con)
This callback is set by the container so that the plugin may access it |
void |
start()
|
protected void |
startStoreManager()
|
void |
stop()
|
void |
storeEntity(EntityEnterpriseContext instance)
This method is called whenever an entity shall be stored to the underlying storage. |
void |
unregisterCascadeDelete(Object key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDBCStoreManager2()
Method Detail |
public Schema getSchema()
public Catalog getCatalog()
getCatalog
in interface JDBCEntityPersistenceStore
public QueryFactory getQueryFactory()
public boolean registerCascadeDelete(Object key, Object value)
public boolean isCascadeDeleted(Object key)
public void unregisterCascadeDelete(Object key)
public void setContainer(Container con)
ContainerPlugin
setContainer
in interface ContainerPlugin
con
- 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 JDBCAbstractEntityBridge getEntityBridge()
getEntityBridge
in interface JDBCEntityPersistenceStore
public JDBCEntityMetaData getMetaData()
getMetaData
in interface JDBCEntityPersistenceStore
public JDBCTypeFactory getJDBCTypeFactory()
getJDBCTypeFactory
in interface JDBCEntityPersistenceStore
public EntityContainer getContainer()
getContainer
in interface JDBCEntityPersistenceStore
public Object getApplicationData(Object key)
getApplicationData
in interface JDBCEntityPersistenceStore
public void putApplicationData(Object key, Object value)
putApplicationData
in interface JDBCEntityPersistenceStore
public Object createBeanClassInstance() throws Exception
EntityPersistenceStore
createBeanClassInstance
in interface EntityPersistenceStore
Exception
public void initEntity(EntityEnterpriseContext ctx)
EntityPersistenceStore
This method is called before createEntity, and should resetStats the value of all cmpFields to 0 or null.
initEntity
in interface EntityPersistenceStore
ctx
- public Object createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws 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
javax.ejb.CreateException
public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws javax.ejb.CreateException
EntityPersistenceStore
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
javax.ejb.CreateException
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws javax.ejb.FinderException
EntityPersistenceStore
findEntity
in interface EntityPersistenceStore
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder call
javax.ejb.FinderException
public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws javax.ejb.FinderException
EntityPersistenceStore
findEntities
in interface EntityPersistenceStore
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersinstance
- the instance to use for the finder call
javax.ejb.FinderException
public void activateEntity(EntityEnterpriseContext ctx)
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 activationpublic void loadEntity(EntityEnterpriseContext ctx)
EntityPersistenceStore
loadEntity
in interface EntityPersistenceStore
ctx
- the instance to synchronizepublic boolean isStoreRequired(EntityEnterpriseContext instance)
EntityPersistenceStore
isStoreRequired
in interface EntityPersistenceStore
instance
- the instance to check
public boolean isModified(EntityEnterpriseContext instance) throws Exception
EntityPersistenceStore
isModified
in interface EntityPersistenceStore
instance
-
Exception
public void storeEntity(EntityEnterpriseContext instance)
EntityPersistenceStore
storeEntity
in interface EntityPersistenceStore
instance
- the instance to synchronizepublic void passivateEntity(EntityEnterpriseContext ctx)
EntityPersistenceStore
See the activate discussion for the reason for exposing EJB callback calls to the store.
passivateEntity
in interface EntityPersistenceStore
ctx
- the instance to passivatepublic void removeEntity(EntityEnterpriseContext ctx) throws javax.ejb.RemoveException
EntityPersistenceStore
removeEntity
in interface EntityPersistenceStore
ctx
- the instance to remove
javax.ejb.RemoveException
- thrown if the instance could not be removedprotected void initStoreManager() throws Exception
Exception
protected void startStoreManager() throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |