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

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

public abstract class BasicCmp2Bean
extends java.lang.Object
implements javax.ejb.EntityBean

See Also:
Serialized Form

Field Summary
 java.util.Map<java.lang.String,OperationsPolicy> allowedOperationsTable
           
 javax.ejb.EntityContext ejbContext
           
 
Constructor Summary
BasicCmp2Bean()
           
 
Method Summary
 java.lang.String businessMethod(java.lang.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.
 java.lang.Integer ejbCreateObject(java.lang.String name)
          Maps to BasicCmpHome.create(String name)
 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(java.lang.String name)
           
 void ejbRemove()
          A container invokes this method before it removes the EJB object that is currently associated with the instance.
abstract  void ejbSelectRemoveById(java.lang.Integer someId)
           
 void ejbStore()
          A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.
 OperationsPolicy getAllowedOperationsReport(java.lang.String methodName)
          Maps to BasicCmpObject.getAllowedOperationsReport Returns a report of the allowed opperations for one of the bean's methods.
abstract  java.lang.String getFirstName()
           
abstract  java.lang.Integer getId()
           
abstract  java.lang.String getLastName()
           
 java.util.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(java.lang.String firstName)
           
abstract  void setId(java.lang.Integer primaryKey)
           
abstract  void setLastName(java.lang.String lastName)
           
protected  void testAllowedOperations(java.lang.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 java.util.Map<java.lang.String,OperationsPolicy> allowedOperationsTable
Constructor Detail

BasicCmp2Bean

public BasicCmp2Bean()
Method Detail

getId

public abstract java.lang.Integer getId()

setId

public abstract void setId(java.lang.Integer primaryKey)

getFirstName

public abstract java.lang.String getFirstName()

setFirstName

public abstract void setFirstName(java.lang.String firstName)

getLastName

public abstract java.lang.String getLastName()

setLastName

public abstract void setLastName(java.lang.String lastName)

ejbSelectRemoveById

public abstract void ejbSelectRemoveById(java.lang.Integer someId)
                                  throws javax.ejb.FinderException
Throws:
javax.ejb.FinderException

ejbHomeSum

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


ejbHomeVoidSelect

public void ejbHomeVoidSelect()
                       throws javax.ejb.FinderException
Throws:
javax.ejb.FinderException

ejbCreateObject

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

Throws:
javax.ejb.CreateException

ejbPostCreateObject

public void ejbPostCreateObject(java.lang.String name)

businessMethod

public java.lang.String businessMethod(java.lang.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 java.util.Properties getPermissionsReport()
Maps to BasicCmpObject.getPermissionsReport Returns a report of the bean's runtime permissions


getAllowedOperationsReport

public OperationsPolicy getAllowedOperationsReport(java.lang.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(java.lang.String methodName)


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