|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.opmath.test.j2ee.book.ContactBookBean
Title: Example: DMLDoc with J2SDKEE 1.3.1 Description: Demonstrates the use of DMLDoc (as contained within Open Math utilities v010) with the Sun Java 2 Software Development Kit Enterprise Edition (J2SDKEE) version 1.3.1. Copyright: Copyright (c) 2002 Company: The Open Math Company Limited
| Field Summary | |
protected static String |
CONTACT_CODED_NAME
The coded name of the Contact EJB. |
protected static String |
UIDGEN_CODED_NAME
The coded name of the Unique Id Generator EJB. |
protected static String |
UIDGEN_KEY_CODED_ENTRY
The coded entry of the Unique Id Generator Key reference. |
| Constructor Summary | |
ContactBookBean()
|
|
| Method Summary | |
Contact |
createContact(ContactVO data)
Creates a new contact in this book. |
void |
ejbActivate()
Invoked when the instance is taken out of the pool of available instances to become associated with a specific EJB object. |
void |
ejbCreate()
Creates a new ContactBook instance. |
void |
ejbPassivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific session EJB object. |
void |
ejbRemove()
The container invokes this method before it removes the EJB object that is currently associated with the instance. |
Collection |
getAllContacts()
Finds all the Contact EJBs in this contact book. |
Contact |
getContact(ContactPK key)
Finds the specified Contact EJB in this contact book. |
Collection |
getContactsForNames(String givenName,
String familyName)
Finds all Contact EJBs in this contact book whose 'given name' field exactly matches the parameter givenName or 'family name' field exactly matches
the parameter familyName. |
void |
removeContact(ContactPK key)
Removes the specified contact from this contact book. |
void |
setSessionContext(SessionContext ctx)
Sets the private session context of this instance. |
void |
unsetSessionContext()
Sets the private session context of this instance to null. |
Contact |
updateContact(ContactPK key,
ContactVO data)
Sets the state of the specified Contact EJB using the given value object. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected static final String CONTACT_CODED_NAME
The coded name of the Contact EJB. This is the name that is used to obtain an object reference to the Contact EJB home interface.
In the J2SDKEE 1.3.1 Application Deployment Tool, the value should be
declared in the ContactBookEJB > EJB Refs > Coded Name. Should be
set to ejb/Contact.
protected static final String UIDGEN_KEY_CODED_ENTRY
The coded entry of the Unique Id Generator Key reference. This is the entry that specifies the key for the unqiue Id generator used to generate ids for contact book entries.
In the J2SDKEE 1.3.1 Application Deployment Tool, the value should be
specified in the ContactBookEJB > Env. Entries > Coded Entry. The coded entry
name should be set to init/uIdKey, the Type should be set to
String, and the value should be set according to the suggestion
given on the UniqueIDGenerator package.
protected static final String UIDGEN_CODED_NAME
The coded name of the Unique Id Generator EJB. This is the name that is used to obtain an object reference to the UniqueIdGenerator EJB home interface.
In the J2SDKEE 1.3.1 Application Deployment Tool, the value should be
declared in the ContactBookEJB > EJB Refs > Coded Name. The value should be
set to ejb/UniqueIdGenerator
| Constructor Detail |
public ContactBookBean()
| Method Detail |
public Contact createContact(ContactVO data)
throws CreateException
Creates a new contact in this book. The new contact will have state determined by the given value object. The key for the new contact will be set automatically. The method returns the (remote interface of) the new EJB.
data - a ContactVO carrying the state for the
new Contact EJB.Contact remote interface to the new Contact EJB.CreateException - if the request not be completed, for whatever
reason.
public Contact updateContact(ContactPK key,
ContactVO data)
throws FinderException
Sets the state of the specified Contact EJB using the given value object.
key - a ContactPK specifying the Contact EJB.data - a ContactVO carrying the new state for the
specified Contact EJB.FinderException - if the request not be completed, for whatever
reason (for example, because no Contact EJB exists for the given key within
this contact book).
public void removeContact(ContactPK key)
throws RemoveException
Removes the specified contact from this contact book.
key - a ContactPK specifying the Contact EJB.RemoveException - if the request not be completed, for whatever
reason (for example, because no Contact EJB exists for the given key within
this contact book).
public Contact getContact(ContactPK key)
throws FinderException
Finds the specified Contact EJB in this contact book. The method returns the remote interface for the found Contact EJB.
key - a ContactPK specifying the Contact EJB.FinderException - if the request not be completed, for whatever
reason (for example, because no Contact EJB exists for the given key within
this contact book).
public Collection getContactsForNames(String givenName,
String familyName)
throws FinderException
Finds all Contact EJBs in this contact book whose 'given name' field exactly
matches the parameter givenName or 'family name' field exactly matches
the parameter familyName. Parameters may be empty Strings, but may
not be null. Regular expressions are not recognised. Matching
is case-sensitive.
givenName - a String specifying the 'given name' field.familyName - a String specifying the 'family name' field.FinderException - if the request not be completed, for whatever
reason (for example, because no matching Contact EJBs exist within
this contact book).
public Collection getAllContacts()
throws FinderException
Finds all the Contact EJBs in this contact book.
FinderException - if the request not be completed, for whatever
reason (for example, because no Contact EJBs exist within this contact book).public void ejbCreate()
Creates a new ContactBook instance.
public void setSessionContext(SessionContext ctx)
Sets the private session context of this instance. The container invokes this method on an instance after it has been created.
setSessionContext in interface SessionBeanctx - a SessionContext giving access
to the coded name / coded entry values.public void unsetSessionContext()
Sets the private session context of this instance to null.
The container calls this method before removing the instance.
public void ejbActivate()
Invoked when the instance is taken out of the pool of available instances to become associated with a specific EJB object.
This transitions the instance to the ready state.
ejbActivate in interface SessionBeanpublic void ejbPassivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific session EJB object.
After this method completes, the container will place the instance into the pool of available instances.
ejbPassivate in interface SessionBeanpublic void ejbRemove()
The 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 transitions the instance from the ready state to the pool of available instances.
ejbRemove in interface SessionBean
|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||