org.objectweb.jonas.jtests.beans.relatives
Class RelativeEC2

org.objectweb.jonas.jtests.beans.relatives.RelativeEC2

public abstract class RelativeEC2

This is an entity bean with "container managed persistence version 2.x".

Author:
Christophe Ney - cney@batisseurs.com

Field Summary
protected static org.objectweb.util.monolog.api.Logger logger
           
 
Constructor Summary
RelativeEC2()
           
 
Method Summary
 void ejbActivate()
          This method is called when the instance is activated from its "passive" state.
 java.lang.String ejbCreate(java.lang.String fullName, java.util.Date birthdate, int luckyNumber)
          A container invokes this instance before creating the EJBObject
 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()
          This method is called before the instance enters the "passive" state.
 void ejbPostCreate(java.lang.String fullName, java.util.Date birthdate, int luckyNumber)
          There must be an ejbPostCreate par ejbCreate method
 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.
abstract  double getAverageAnnualVisits()
           
abstract  java.util.Date getBirthdate()
           
abstract  java.lang.String getFullName()
           
abstract  boolean getIsMale()
           
abstract  int getLuckyNumber()
           
abstract  java.util.Set getSibblings()
           
abstract  RelativeLocal getSpouse()
           
abstract  java.util.Set getVisitedRelatives()
           
abstract  void setAverageAnnualVisits(double averageAnnualVisits)
           
abstract  void setBirthdate(java.util.Date birthdate)
           
 void setEntityContext(javax.ejb.EntityContext ctx)
          Set the associated entity context.
abstract  void setFullName(java.lang.String name)
           
abstract  void setIsMale(boolean isMale)
           
abstract  void setLuckyNumber(int age)
           
abstract  void setSibblings(java.util.Set sibblings)
           
abstract  void setSpouse(RelativeLocal spouse)
           
abstract  void setVisitedRelatives(java.util.Set sibblings)
           
 void unsetEntityContext()
          Unset the associated entity context.
 

Field Detail

logger

protected static org.objectweb.util.monolog.api.Logger logger
Constructor Detail

RelativeEC2

public RelativeEC2()
Method Detail

getFullName

public abstract java.lang.String getFullName()

setFullName

public abstract void setFullName(java.lang.String name)

getLuckyNumber

public abstract int getLuckyNumber()

setLuckyNumber

public abstract void setLuckyNumber(int age)

getBirthdate

public abstract java.util.Date getBirthdate()

setBirthdate

public abstract void setBirthdate(java.util.Date birthdate)

getSpouse

public abstract RelativeLocal getSpouse()

setSpouse

public abstract void setSpouse(RelativeLocal spouse)

getSibblings

public abstract java.util.Set getSibblings()

setSibblings

public abstract void setSibblings(java.util.Set sibblings)

getVisitedRelatives

public abstract java.util.Set getVisitedRelatives()

setVisitedRelatives

public abstract void setVisitedRelatives(java.util.Set sibblings)

getIsMale

public abstract boolean getIsMale()

setIsMale

public abstract void setIsMale(boolean isMale)

getAverageAnnualVisits

public abstract double getAverageAnnualVisits()

setAverageAnnualVisits

public abstract void setAverageAnnualVisits(double averageAnnualVisits)

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
Set the associated entity context.

unsetEntityContext

public void unsetEntityContext()
Unset the associated entity context.

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException
A container invokes this method before it removes the EJB object that is currently associated with the instance.

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.

ejbStore

public void ejbStore()
A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.

ejbCreate

public java.lang.String ejbCreate(java.lang.String fullName,
                                  java.util.Date birthdate,
                                  int luckyNumber)
                           throws javax.ejb.CreateException,
                                  javax.ejb.DuplicateKeyException
A container invokes this instance before creating the EJBObject

ejbPostCreate

public void ejbPostCreate(java.lang.String fullName,
                          java.util.Date birthdate,
                          int luckyNumber)
                   throws javax.ejb.CreateException
There must be an ejbPostCreate par ejbCreate method
Throws:
javax.ejb.CreateException - Failure to create an entity EJB object.

ejbPassivate

public void ejbPassivate()
This method is called before the instance enters the "passive" state. The instance should release any resources that it can re-acquire later in the ejbActivate() method. After the passivate method completes, the instance must be in a state that allows the container to use the Java Serialization protocol to externalize and store away the instance's state. This method is called with no transaction context.
Throws:
javax.ejb.EJBException - - Thrown if the instance could not perform the function requested by the container

ejbActivate

public void ejbActivate()
This method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method. This method is called with no transaction context.
Throws:
javax.ejb.EJBException - - Thrown if the instance could not perform the function requested by the container