org.openejb.test.entity.bmp
Class BasicBmp2DataSourcesBean

java.lang.Object
  extended by org.openejb.test.entity.bmp.BasicBmp2DataSourcesBean
All Implemented Interfaces:
Serializable, javax.ejb.EnterpriseBean, javax.ejb.EntityBean

public class BasicBmp2DataSourcesBean
extends Object
implements javax.ejb.EntityBean

Author:
David Blevins, Richard Monson-Haefel
See Also:
Serialized Form

Field Summary
 Hashtable allowedOperationsTable
           
 javax.ejb.EntityContext ejbContext
           
 String firstName
           
 String lastName
           
static int primaryKey
           
 
Constructor Summary
BasicBmp2DataSourcesBean()
           
 
Method Summary
 String businessMethod(String text)
          Maps to BasicBmp2DataSourcesObject.businessMethod
 void ejbActivate()
          A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.
 Integer ejbCreate(String name)
          Maps to BasicBmp2DataSourcesHome.create
 Integer ejbFindByPrimaryKey(Integer primaryKey)
          Maps to BasicBmp2DataSourcesHome.findByPrimaryKey
 Collection ejbFindEmptyCollection()
          Maps to BasicBmp2DataSourcesHome.findEmptyCollection
 int ejbHomeSum(int x, int y)
          Maps to BasicBmp2DataSourcesHome.sum Adds x and y and returns the result.
 void ejbLoad()
          A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database.
 void ejbPassivate()
          A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.
 void ejbPostCreate(String name)
           
 void ejbRemove()
          A container invokes this method before it removes the EJB object that is currently associated with the instance.
 void ejbStore()
          A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.
 OperationsPolicy getAllowedOperationsReport(String methodName)
          Maps to BasicBmp2DataSourcesObject.getAllowedOperationsReport Returns a report of the allowed opperations for one of the bean's methods.
 Properties getPermissionsReport()
          Maps to BasicBmp2DataSourcesObject.getPermissionsReport Returns a report of the bean's runtime permissions
 void setEntityContext(javax.ejb.EntityContext ctx)
          Set the associated entity context.
protected  void testAllowedOperations(String methodName)
           
 void unsetEntityContext()
          Unset the associated entity context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

primaryKey

public static int primaryKey

firstName

public String firstName

lastName

public String lastName

ejbContext

public javax.ejb.EntityContext ejbContext

allowedOperationsTable

public Hashtable allowedOperationsTable
Constructor Detail

BasicBmp2DataSourcesBean

public BasicBmp2DataSourcesBean()
Method Detail

ejbHomeSum

public int ejbHomeSum(int x,
                      int y)
Maps to BasicBmp2DataSourcesHome.sum Adds x and y and returns the result.

Parameters:
one -
two -
Returns:
x + y
See Also:
BasicBmp2DataSourcesHome.sum

ejbFindEmptyCollection

public Collection ejbFindEmptyCollection()
                                  throws javax.ejb.FinderException,
                                         RemoteException
Maps to BasicBmp2DataSourcesHome.findEmptyCollection

Returns:
Collection
Throws:
javax.ejb.FinderException
RemoteException

ejbFindByPrimaryKey

public Integer ejbFindByPrimaryKey(Integer primaryKey)
                            throws javax.ejb.FinderException
Maps to BasicBmp2DataSourcesHome.findByPrimaryKey

Parameters:
primaryKey -
Returns:
Integer
Throws:
javax.ejb.FinderException

ejbCreate

public Integer ejbCreate(String name)
                  throws javax.ejb.CreateException
Maps to BasicBmp2DataSourcesHome.create

Parameters:
name -
Returns:
Integer
Throws:
javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(String name)
                   throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

businessMethod

public String businessMethod(String text)
Maps to BasicBmp2DataSourcesObject.businessMethod

Returns:
String

getPermissionsReport

public Properties getPermissionsReport()
Maps to BasicBmp2DataSourcesObject.getPermissionsReport Returns a report of the bean's runtime permissions

Returns:
null

getAllowedOperationsReport

public OperationsPolicy getAllowedOperationsReport(String methodName)
Maps to BasicBmp2DataSourcesObject.getAllowedOperationsReport Returns a report of the allowed opperations for one of the bean's methods.

Parameters:
methodName - The method for which to get the allowed opperations report
Returns:
OperationPolicy

ejbLoad

public void ejbLoad()
             throws javax.ejb.EJBException,
                    RemoteException
A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database.

Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws javax.ejb.EJBException,
                             RemoteException
Set the associated entity context. The container invokes this method on an instance after the instance has been created.

Specified by:
setEntityContext in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

unsetEntityContext

public void unsetEntityContext()
                        throws javax.ejb.EJBException,
                               RemoteException
Unset the associated entity context. The container calls this method before removing the instance.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbStore

public void ejbStore()
              throws javax.ejb.EJBException,
                     RemoteException
A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.

Specified by:
ejbStore in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException,
                      javax.ejb.EJBException,
                      RemoteException
A container invokes this method before it removes the EJB object that is currently associated with the instance. This method is invoked when a client invokes a remove operation on the enterprise Bean's home interface or the EJB object's remote interface. This method transitions the instance from the ready state to the pool of available instances.

Specified by:
ejbRemove in interface javax.ejb.EntityBean
Throws:
javax.ejb.RemoveException
javax.ejb.EJBException
RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        RemoteException
A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object. This method transitions the instance to the ready state.

Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         RemoteException
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. After this method completes, the container will place the instance into the pool of available instances.

Specified by:
ejbPassivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

testAllowedOperations

protected void testAllowedOperations(String methodName)


Copyright © 1999-2012 OpenEJB. All Rights Reserved.