| java.lang.Object org.apache.ojb.ejb.SessionBeanImpl org.apache.ojb.ejb.odmg.ODMGBaseBeanImpl
All known Subclasses: org.apache.ojb.ejb.odmg.ArticleManagerODMGBean, org.apache.ojb.ejb.odmg.PersonManagerODMGBean, org.apache.ojb.ejb.odmg.RollbackBean,
ODMGBaseBeanImpl | abstract public class ODMGBaseBeanImpl extends SessionBeanImpl (Code) | | Base class for using OJB-ODMG api within SessionBeans,
subclass this class to implement your own bean
implementations.
To keep this example as simple as possible, we lookup a static OJB ODMG
implementation instance from an helper class.
But it's recommended to bind an instances of the ODMG main/access classes in JNDI
(at appServer start), open the database and lookup these instances instance via JNDI in
ejbCreate(), instead of lookup a static instance on each bean creation.
To get the
org.odmg.Database or
org.odmg.Implementation instance use
the
ODMGBaseBeanImpl.getDatabase and
ODMGBaseBeanImpl.getImplementation methods.
Additionally there are some basic methods for
storing, deleting, counting, get all objects
implemented.
author: Armin Waibel version: $Id: ODMGBaseBeanImpl.java,v 1.5.2.4 2005/12/21 22:21:39 tomdz Exp $ |
deleteObject | public void deleteObject(Object object)(Code) | | Delete an object.
|
deleteObjects | public void deleteObjects(Collection objects)(Code) | | Delete a Collection of objects.
|
ejbCreate | public void ejbCreate()(Code) | | Lookup the OJB ODMG implementation.
It's recommended to bind an instance of the Implementation class in JNDI
(at appServer start), open the database and lookup this instance via JNDI in
ejbCreate().
|
ejbRemove | public void ejbRemove()(Code) | | Here we do the OJB cleanup.
|
getCount | public int getCount(Class target)(Code) | | Return the count of all objects found
for given class, using the PB-api within
ODMG - this may change in further versions.
|
getDatabase | public Database getDatabase()(Code) | | Return the Database associated with
this bean.
|
getImplementation | public Implementation getImplementation()(Code) | | Return the Implementation instance associated
with this bean.
|
|
|