Methods Summary |
---|
public void | addPhoneNumber(java.lang.String number, byte type)
InitialContext jndiEnc = new InitialContext();
PhoneHomeLocal phoneHome = (PhoneHomeLocal)(jndiEnc.lookup("PhoneHomeLocal"));
PhoneLocal phone = phoneHome.create(number,type);
Collection phoneNumbers = this.getPhoneNumbers( );
phoneNumbers.add(phone);
|
public void | ejbActivate()
|
public java.lang.Integer | ejbCreate(java.lang.Integer id)
this.setId(id);
return null;
|
public void | ejbLoad()
|
public void | ejbPassivate()
|
public void | ejbPostCreate(java.lang.Integer id)
|
public void | ejbRemove()
|
public void | ejbStore()
|
public abstract CreditCardLocal | getCreditCard()
|
public abstract java.lang.String | getFirstName()
|
public abstract boolean | getHasGoodCredit()
|
public abstract AddressLocal | getHomeAddress()
|
public abstract java.lang.Integer | getId()
|
public abstract java.lang.String | getLastName()
|
public Name | getName()
Name name = new Name(getLastName(),getFirstName());
return name;
|
public java.util.Vector | getPhoneList()
Vector vv = new Vector();
Collection phoneNumbers = this.getPhoneNumbers();
Iterator iterator = phoneNumbers.iterator();
while(iterator.hasNext()) {
PhoneLocal phone = (PhoneLocal)iterator.next();
String ss = "Type="+phone.getType()+" Number="+phone.getNumber();
vv.add(ss);
}
return vv;
|
public abstract java.util.Collection | getPhoneNumbers()
|
public abstract java.util.Collection | getReservations()
|
public void | removePhoneNumber(byte typeToRemove)
Collection phoneNumbers = this.getPhoneNumbers();
Iterator iterator = phoneNumbers.iterator();
while(iterator.hasNext())
{
PhoneLocal phone = (PhoneLocal)iterator.next();
if (phone.getType() == typeToRemove)
{
phoneNumbers.remove(phone);
break;
}
}
|
public abstract void | setCreditCard(CreditCardLocal card)
|
public void | setEntityContext(javax.ejb.EntityContext ec)
|
public abstract void | setFirstName(java.lang.String fname)
|
public abstract void | setHasGoodCredit(boolean flag)
|
public abstract void | setHomeAddress(AddressLocal address)
|
public abstract void | setId(java.lang.Integer id)
|
public abstract void | setLastName(java.lang.String lname)
|
public void | setName(Name name)
setLastName(name.getLastName());
setFirstName(name.getFirstName());
|
public abstract void | setPhoneNumbers(java.util.Collection phones)
|
public abstract void | setReservations(java.util.Collection reservations)
|
public void | unsetEntityContext()
|
public void | updatePhoneNumber(java.lang.String number, byte typeToUpdate)
Collection phoneNumbers = this.getPhoneNumbers();
Iterator iterator = phoneNumbers.iterator();
while(iterator.hasNext())
{
PhoneLocal phone = (PhoneLocal)iterator.next();
if (phone.getType() == typeToUpdate)
{
phone.setNumber(number);
break;
}
}
|