| org.jboss.ejb.plugins.CMPInMemoryPersistenceManager
Method Summary | |
public void | activateEntity(EntityEnterpriseContext instance) Non-operation. | public Object | createBeanClassInstance() Returns a new instance of the bean class or a subclass of the bean class. | public Object | createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) This method is called whenever an entity is to be created. | protected void | createService() | public Collection | findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) This method is called when collections of entities are to be found. | public Object | findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) This method is called when single entities are to be found. | public void | initEntity(EntityEnterpriseContext ctx) Initializes the instance context. | public boolean | isModified(EntityEnterpriseContext ctx) | public boolean | isStoreRequired(EntityEnterpriseContext ctx) This method is used to determine if an entity should be stored. | public void | loadEntity(EntityEnterpriseContext ctx) This method is called whenever an entity shall be load from the
underlying storage. | public void | passivateEntity(EntityEnterpriseContext instance) Non-operation. | public Object | postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) This method is called after the createEntity. | public void | removeEntity(EntityEnterpriseContext ctx) This method is called when an entity shall be removed from the
underlying storage. | public void | setContainer(Container con) | protected void | stopService() | public void | storeEntity(EntityEnterpriseContext ctx) This method is called whenever an entity shall be stored to the
underlying storage. | protected void | storeEntity(Object id, Object obj) |
isModified | protected Method isModified(Code) | | Optional isModified method used by storeEntity.
|
CMPInMemoryPersistenceManager | public CMPInMemoryPersistenceManager()(Code) | | |
createBeanClassInstance | public Object createBeanClassInstance() throws Exception(Code) | | Returns a new instance of the bean class or a subclass of the bean class.
the new instance throws: Exception - |
createEntity | public Object createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code) | | This method is called whenever an entity is to be created.
The persistence manager is responsible for handling the results properly
wrt the persistent store.
Parameters: m - the create method in the home interface that wascalled Parameters: args - any create parameters Parameters: ctx - the instance being used for this create call The primary key computed by CMP PM or null for BMP throws: Exception - |
createService | protected void createService() throws Exception(Code) | | create the service, do expensive operations etc
|
findEntities | public 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 must return a
collection of primaryKeys.
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 primary key collection representing the foundentities throws: Exception - thrown if some heuristic problem occurs |
findEntity | public 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, if so it returns the primary key of
the object.
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 a primary key representing the found entity throws: Exception - thrown if some heuristic problem occurs |
initEntity | public void initEntity(EntityEnterpriseContext ctx)(Code) | | Initializes the instance context.
This method is called before createEntity, and should
reset the value of all cmpFields to 0 or null.
Parameters: ctx - |
isStoreRequired | public boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception(Code) | | This method is used to determine if an entity should be stored.
Parameters: ctx - the instance to check true, if the entity has been modified throws: Exception - thrown if some system exception occurs |
loadEntity | public void loadEntity(EntityEnterpriseContext ctx)(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: ctx - the instance to synchronize |
postCreateEntity | public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code) | | This method is called after the createEntity.
The persistence manager is responsible for handling the results properly
wrt the persistent store.
Parameters: m - the ejbPostCreate method in the bean class that wascalled Parameters: args - any create parameters Parameters: ctx - the instance being used for this create call null throws: Exception - |
removeEntity | public void removeEntity(EntityEnterpriseContext ctx) throws javax.ejb.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: ctx - the instance to remove throws: javax.ejb.RemoveException - thrown if the instance could not be removed |
setContainer | public void setContainer(Container con)(Code) | | This callback is set by the container so that the plugin may access it
Parameters: con - The container using this plugin. throws: ClassCastException - Container is not a EntityContainer. |
storeEntity | public void storeEntity(EntityEnterpriseContext ctx)(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: ctx - the instance to synchronize |
|
|