com.bankframe.examples.bo.impl.customer
Class CustomerBMPBean

java.lang.Object
  extended bycom.bankframe.examples.bo.customer.CustomerBean
      extended bycom.bankframe.examples.bo.impl.customer.CustomerBean
          extended bycom.bankframe.examples.bo.impl.customer.CustomerBMPBean
All Implemented Interfaces:
EBMPEntity, EBMPMasterEntity, EEntity, javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable

public class CustomerBMPBean
extends CustomerBean
implements javax.ejb.EntityBean, EBMPMasterEntity

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

Author:
ETU
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bankframe.examples.bo.customer.CustomerBean
firstName, lastName, ownerId, title
 
Fields inherited from interface com.bankframe.ejb.EEntity
serialVersionUID
 
Constructor Summary
CustomerBMPBean()
          Default constructor.
 
Method Summary
 void amend(java.lang.String title, java.lang.String firstName, java.lang.String lastName)
          This method amends the attributes of the customer entity.
 Address amendAddress(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 address entity associated with this customer entity.
 EPrimaryKey createPrimaryKey(DataPacket dp)
          This method builds a primary from a given DataPacket.
 void ejbActivate()
          This method is called by the EJB container when this EJB instance is activated.
 CustomerPK ejbCreate(java.lang.String ownerId, java.lang.String title, java.lang.String firstName, java.lang.String lastName)
          This method initialises a new instance of the customer entity.
 java.util.Enumeration ejbFindAll()
          This method gets all instances of this EJB
 java.util.Enumeration ejbFindByFirstName(java.lang.String firstName)
          This method get all instance of this EJB with the given first name
 java.util.Enumeration ejbFindByLastName(java.lang.String lastName)
          This method get all instance of this EJB with the given last name
 CustomerPK ejbFindByPrimaryKey(CustomerPK primaryKey)
          This method verifies that the specified customer instance exists.
 java.util.Enumeration ejbFindByTitle(java.lang.String title)
          This method get all instance of this EJB with the given title.
 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 title, java.lang.String firstName, java.lang.String lastName)
           
 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.util.Vector getDependentEntities()
          This method gets all entity beans that depend on this EJB.
 java.lang.String getEntityName()
          This method gets the JNDI name of this entity.
 EPersister getPersister()
          This method retrieves the persister to use with this entity bean instance.
 EPrimaryKey getPrimaryKey()
          This method returns 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.customer.CustomerBean
getAddress, toDataPacket
 
Methods inherited from class com.bankframe.examples.bo.customer.CustomerBean
create, getFirstName, getLastName, getOwnerId, getTitle
 
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

CustomerBMPBean

public CustomerBMPBean()
Default constructor.

Method Detail

amend

public void amend(java.lang.String title,
                  java.lang.String firstName,
                  java.lang.String lastName)
           throws ValidationException
This method amends the attributes of the customer entity.

Overrides:
amend in class CustomerBean
Parameters:
title -
firstName -
lastName -
Throws:
ValidationException

amendAddress

public Address amendAddress(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 ProcessingErrorException,
                            ValidationException,
                            java.rmi.RemoteException
This method amends the address entity associated with this customer entity.

Overrides:
amendAddress in class CustomerBean
Parameters:
addressLine1 -
addressLine2 -
addressLine3 -
addressLine4 -
country -
postCode -
Throws:
ProcessingErrorException
java.rmi.RemoteException
ValidationException

createPrimaryKey

public EPrimaryKey createPrimaryKey(DataPacket dp)
                             throws ProcessingErrorException
This method builds a primary from a given DataPacket.

Specified by:
createPrimaryKey in interface EBMPEntity
Parameters:
dp - the DataPacket to create the key from
Returns:
a primary key instance from the specified data
Throws:
ProcessingErrorException - if processing fails.

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 CustomerPK ejbCreate(java.lang.String ownerId,
                            java.lang.String title,
                            java.lang.String firstName,
                            java.lang.String lastName)
                     throws javax.ejb.CreateException,
                            ValidationException,
                            ProcessingErrorException
This method initialises a new instance of the customer entity.

Parameters:
ownerId -
title -
firstName -
lastName -
Returns:
The key to this entity
Throws:
javax.ejb.CreateException
ProcessingErrorException
ValidationException

ejbFindAll

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

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

ejbFindByFirstName

public java.util.Enumeration ejbFindByFirstName(java.lang.String firstName)
                                         throws javax.ejb.FinderException,
                                                ValidationException
This method get all instance of this EJB with the given first name

Returns:
an enumeration of all instances of the customer entity with the specified first name
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByLastName

public java.util.Enumeration ejbFindByLastName(java.lang.String lastName)
                                        throws javax.ejb.FinderException,
                                               ValidationException
This method get all instance of this EJB with the given last name

Returns:
an enumeration of all instances of the customer entity with the specified last name
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByPrimaryKey

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

Returns:
the primary key of the customer
Throws:
javax.ejb.FinderException
ValidationException

ejbFindByTitle

public java.util.Enumeration ejbFindByTitle(java.lang.String title)
                                     throws javax.ejb.FinderException,
                                            ValidationException
This method get all instance of this EJB with the given title.

Returns:
an enumeration of all instances of the customer entity with the specified title
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 title,
                          java.lang.String firstName,
                          java.lang.String lastName)

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

getDependentEntities

public java.util.Vector getDependentEntities()
                                      throws ProcessingErrorException,
                                             java.rmi.RemoteException
This method gets all entity beans that depend on this EJB.

Specified by:
getDependentEntities in interface EBMPMasterEntity
Returns:
a vector od entity instances that depend on this EJB
Throws:
ProcessingErrorException
java.rmi.RemoteException

getEntityName

public java.lang.String getEntityName()
This method gets 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 persiter to use with this ejb

getPrimaryKey

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

Specified by:
getPrimaryKey in interface EBMPEntity
Returns:
the primary key of 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 to populate 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

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.