org.apache.openejb.test.entity.cmp
Class AllowedOperationsCmp2Bean

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

public abstract class AllowedOperationsCmp2Bean
extends Object
implements javax.ejb.EntityBean

See Also:
Serialized Form

Field Summary
static Map<String,OperationsPolicy> allowedOperationsTable
           
 javax.ejb.EntityContext ejbContext
           
 
Constructor Summary
AllowedOperationsCmp2Bean()
           
 
Method Summary
 String businessMethod(String text)
          Maps to BasicCmpObject.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 ejbCreateObject(String name)
          Maps to BasicCmpHome.create
 int ejbHomeSum(int x, int y)
          Maps to BasicCmpHome.sum Adds x and y and returns the result.
 void ejbHomeVoidSelect()
           
 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 ejbPostCreateObject(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 BasicCmpObject.getAllowedOperationsReport Returns a report of the allowed opperations for one of the bean's methods.
abstract  String getFirstName()
           
abstract  Integer getId()
           
abstract  String getLastName()
           
abstract  int getNumber()
           
 Properties getPermissionsReport()
          Maps to BasicCmpObject.getPermissionsReport Returns a report of the bean's runtime permissions
 void setEntityContext(javax.ejb.EntityContext ctx)
          Set the associated entity context.
abstract  void setFirstName(String firstName)
           
abstract  void setId(Integer primaryKey)
           
abstract  void setLastName(String lastName)
           
abstract  void setNumber(int number)
           
protected  void testAllowedOperations(String methodName)
           
 void throwApplicationException()
          Throws an ApplicationException when invoked
 void throwSystemException_NullPointer()
          Throws a java.lang.NullPointerException when invoked This is a system exception and should result in the destruction of the instance and invalidation of the remote reference.
 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

ejbContext

public javax.ejb.EntityContext ejbContext

allowedOperationsTable

public static final Map<String,OperationsPolicy> allowedOperationsTable
Constructor Detail

AllowedOperationsCmp2Bean

public AllowedOperationsCmp2Bean()
Method Detail

getId

public abstract Integer getId()

setId

public abstract void setId(Integer primaryKey)

getFirstName

public abstract String getFirstName()

setFirstName

public abstract void setFirstName(String firstName)

getLastName

public abstract String getLastName()

setLastName

public abstract void setLastName(String lastName)

getNumber

public abstract int getNumber()

setNumber

public abstract void setNumber(int number)

ejbHomeSum

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


ejbHomeVoidSelect

public void ejbHomeVoidSelect()

ejbCreateObject

public Integer ejbCreateObject(String name)
                        throws javax.ejb.CreateException
Maps to BasicCmpHome.create

Throws:
javax.ejb.CreateException

ejbPostCreateObject

public void ejbPostCreateObject(String name)

businessMethod

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


throwApplicationException

public void throwApplicationException()
                               throws ApplicationException
Throws an ApplicationException when invoked

Throws:
ApplicationException

throwSystemException_NullPointer

public void throwSystemException_NullPointer()
Throws a java.lang.NullPointerException when invoked This is a system exception and should result in the destruction of the instance and invalidation of the remote reference.


getPermissionsReport

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


getAllowedOperationsReport

public OperationsPolicy getAllowedOperationsReport(String methodName)
Maps to BasicCmpObject.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

ejbLoad

public void ejbLoad()
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

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
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

unsetEntityContext

public void unsetEntityContext()
Unset the associated entity context. The container calls this method before removing the instance.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
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

ejbRemove

public void ejbRemove()
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

ejbActivate

public 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. This method transitions the instance to the ready state.

Specified by:
ejbActivate in interface javax.ejb.EntityBean

ejbPassivate

public void ejbPassivate()
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

testAllowedOperations

protected void testAllowedOperations(String methodName)


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.