com.bankframe.examples.bo.impl.address
Class AddressBMPBean

java.lang.Object
  extended bycom.bankframe.examples.bo.address.AddressBean
      extended bycom.bankframe.examples.bo.impl.address.AddressBean
          extended bycom.bankframe.examples.bo.impl.address.AddressBMPBean
All Implemented Interfaces:
EBMPEntity, EEntity, javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable

public class AddressBMPBean
extends AddressBean
implements javax.ejb.EntityBean, EBMPEntity

This class is the implementation of the Address Entity EJB using bean managed persistence

Author:
ETU
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bankframe.examples.bo.address.AddressBean
addressLine1, addressLine2, addressLine3, addressLine4, country, ownerId, postCode
 
Fields inherited from interface com.bankframe.ejb.EEntity
serialVersionUID
 
Constructor Summary
AddressBMPBean()
          Default constructor.
 
Method Summary
 void amend(java.lang.String addressLine1, java.lang.String addressLine2, java.lang.String addressLine3, java.lang.String addressLine4, java.lang.String country, java.lang.String postCode)
          This method amends the attributes of the Address entity.
 EPrimaryKey createPrimaryKey(DataPacket dp)
          This method creates a primary key instance from the specified data.
 void ejbActivate()
          This method is called by the EJB container when this EJB instance is activated.
 AddressPK ejbCreate(java.lang.String ownerId, java.lang.String addressLine1, java.lang.String addressLine2, java.lang.String addressLine3, java.lang.String addressLine4, java.lang.String country, java.lang.String postCode)
          This method initialises a new instance of the Address entity.
 java.util.Enumeration ejbFindAll()
          This method gets all instances of the Address entities.
 java.util.Enumeration ejbFindByCountry(java.lang.String country)
          This method gets all instance of the Address entity with the specified country value.
 java.util.Enumeration ejbFindByPostCode(java.lang.String postCode)
          This method finds all EJBs with the given post code.
 AddressPK ejbFindByPrimaryKey(AddressPK primaryKey)
          This method verifies that the specified Address instance exists.
 void ejbLoad()
          This method is called by the EJB container when this EJB instance must refresh itself from persistent storage
 void ejbPassivate()
          This method is called by the EJB container when this EJB instance is passivated.
 void ejbPostCreate(java.lang.String ownerId, java.lang.String addressLine1, java.lang.String addressLine2, java.lang.String addressLine3, java.lang.String addressLine4, java.lang.String country, java.lang.String postCode)
           
 void ejbRemove()
          This method is called by the EJB container when this EJB instance must be deleted from persistent storage.
 void ejbStore()
          This method is called by the EJB contain when this EJB instance must store its attributes in persistent storage.
 java.lang.String getEntityName()
          This method returns the JNDI name of this entity
 EPersister getPersister()
          This method retrieves the persister to use with this entity bean instance.
 EPrimaryKey getPrimaryKey()
          This method gets the primary key object for this entity instance.
 void populate(DataPacket dp)
          This method populates the attributes of the entity instance with the specified data.
 void setEntityContext(javax.ejb.EntityContext newCtx)
          This method is called by the EJB container when the EJB instance is about to be used.
 void unsetEntityContext()
          This method is called by the EJB container when the EJB instance is no longer being used.
 
Methods inherited from class com.bankframe.examples.bo.impl.address.AddressBean
toDataPacket
 
Methods inherited from class com.bankframe.examples.bo.address.AddressBean
create, getAddressLine1, getAddressLine2, getAddressLine3, getAddressLine4, getCountry, getOwnerId, getPostCode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bankframe.ejb.EEntity
toDataPacket
 

Constructor Detail

AddressBMPBean

public AddressBMPBean()
Default constructor.

Method Detail

amend

public void amend(java.lang.String addressLine1,
                  java.lang.String addressLine2,
                  java.lang.String addressLine3,
                  java.lang.String addressLine4,
                  java.lang.String country,
                  java.lang.String postCode)
           throws ValidationException
This method amends the attributes of the Address entity.

Overrides:
amend in class AddressBean
Parameters:
addressLine1 -
addressLine2 -
addressLine3 -
addressLine4 -
country -
postCode -
Throws:
ValidationException

createPrimaryKey

public EPrimaryKey createPrimaryKey(DataPacket dp)
                             throws ProcessingErrorException
This method creates a primary key instance from the specified data.

Specified by:
createPrimaryKey in interface EBMPEntity
Parameters:
dp - the DataPacket containing the primary key data
Returns:
a EPrimary key instance
Throws:
ProcessingErrorException - if a processing error occurs

ejbActivate

public void ejbActivate()
This method is called by the EJB container when this EJB instance is activated.

Specified by:
ejbActivate in interface javax.ejb.EntityBean

ejbCreate

public AddressPK ejbCreate(java.lang.String ownerId,
                           java.lang.String addressLine1,
                           java.lang.String addressLine2,
                           java.lang.String addressLine3,
                           java.lang.String addressLine4,
                           java.lang.String country,
                           java.lang.String postCode)
                    throws javax.ejb.CreateException,
                           ValidationException,
                           ProcessingErrorException
This method initialises a new instance of the Address entity.

Parameters:
ownerId -
addressLine1 -
addressLine2 -
addressLine3 -
addressLine4 -
country -
postCode -
Returns:
a Address primary key instance
Throws:
javax.ejb.CreateException
ProcessingErrorException
ValidationException

ejbFindAll

public java.util.Enumeration ejbFindAll()
                                 throws javax.ejb.FinderException,
                                        ValidationException
This method gets all instances of the Address entities.

Returns:
an enumeration all instances of the Address entity
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByCountry

public java.util.Enumeration ejbFindByCountry(java.lang.String country)
                                       throws javax.ejb.FinderException,
                                              ValidationException
This method gets all instance of the Address entity with the specified country value.

Parameters:
country - the country name to check for
Returns:
an enumeration of Address entities with the specified country value
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByPostCode

public java.util.Enumeration ejbFindByPostCode(java.lang.String postCode)
                                        throws javax.ejb.FinderException,
                                               ValidationException
This method finds all EJBs with the given post code.

Parameters:
postCode - the post code to check for
Returns:
an enumeration of all instances of the Address entity with the specified postCode value
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByPrimaryKey

public AddressPK ejbFindByPrimaryKey(AddressPK primaryKey)
                              throws javax.ejb.FinderException,
                                     ValidationException
This method verifies that the specified Address instance exists.

Parameters:
primaryKey - the primary to check for
Returns:
the Address primary key
Throws:
javax.ejb.FinderException
ValidationException

ejbLoad

public void ejbLoad()
This method is called by the EJB container when this EJB instance must refresh itself from persistent storage

Specified by:
ejbLoad in interface javax.ejb.EntityBean

ejbPassivate

public void ejbPassivate()
This method is called by the EJB container when this EJB instance is passivated.

Specified by:
ejbPassivate in interface javax.ejb.EntityBean

ejbPostCreate

public void ejbPostCreate(java.lang.String ownerId,
                          java.lang.String addressLine1,
                          java.lang.String addressLine2,
                          java.lang.String addressLine3,
                          java.lang.String addressLine4,
                          java.lang.String country,
                          java.lang.String postCode)
Parameters:
ownerId -
addressLine1 -
addressLine2 -
addressLine3 -
addressLine4 -
country -
postCode -

ejbRemove

public void ejbRemove()
This method is called by the EJB container when this EJB instance must be deleted from persistent storage.

Specified by:
ejbRemove in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
This method is called by the EJB contain when this EJB instance must store its attributes in persistent storage.

Specified by:
ejbStore in interface javax.ejb.EntityBean

getEntityName

public java.lang.String getEntityName()
This method returns the JNDI name of this entity

Specified by:
getEntityName in interface EBMPEntity
Returns:
the JNDI name of this entity

getPersister

public EPersister getPersister()
This method retrieves the persister to use with this entity bean instance.

Specified by:
getPersister in interface EBMPEntity
Returns:
the persister for this entity

getPrimaryKey

public EPrimaryKey getPrimaryKey()
This method gets the primary key object for this entity instance.

Specified by:
getPrimaryKey in interface EBMPEntity
Returns:
the EPrimaryKey for this entity

populate

public void populate(DataPacket dp)
This method populates the attributes of the entity instance with the specified data.

Specified by:
populate in interface EBMPEntity
Parameters:
dp - the dataPacket containing the data to populate the entity with

setEntityContext

public void setEntityContext(javax.ejb.EntityContext newCtx)
This method is called by the EJB container when the EJB instance is about to be used.

Specified by:
setEntityContext in interface javax.ejb.EntityBean
Parameters:
newCtx -

unsetEntityContext

public void unsetEntityContext()
This method is called by the EJB container when the EJB instance is no longer being used.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean


Copyright © 2004 Siebel Systems, Inc. All rights reserved.