Methods Summary |
---|
public void | ejbActivate()
|
public java.lang.Integer | ejbCreate(java.lang.Integer id)
this.setId(id);
return id;
|
public void | ejbLoad()
|
public void | ejbPassivate()
|
public void | ejbPostCreate(java.lang.Integer id)
|
public void | ejbRemove()
|
public void | ejbStore()
|
public AddressDO | getAddress()
AddressLocal addrLocal = this.getHomeAddress(); // TODO THIS SHOULD WORK BUT RETURNS NULL
Integer addressID = addrLocal.getId();
String street = addrLocal.getStreet();
String city = addrLocal.getCity();
String state = addrLocal.getState();
String zip = addrLocal.getZip();
AddressDO addrValue = new AddressDO(addressID,street,city,state,zip);
return addrValue;
|
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 void | setAddress(java.lang.Integer addressID, java.lang.String street, java.lang.String city, java.lang.String state, java.lang.String zip)
AddressLocal addr = this.getHomeAddress();
if (addr == null) {
// Customer doesn't have an address yet. Create a new one.
InitialContext cntx = new InitialContext();
AddressHomeLocal addrHome =
(AddressHomeLocal)cntx.lookup("java:comp/env/ejb/AddressHomeLocal");
addr = addrHome.createAddress(addressID,street, city, state, zip);
this.setHomeAddress(addr);
} else {
// Customer already has an address. Change its fields
addr.setStreet(street);
addr.setCity(city);
addr.setState(state);
addr.setZip(zip);
//addr.setId(addressID);
}
|
public void | setAddress(AddressDO addrValue)
String street = addrValue.getStreet();
String city = addrValue.getCity();
String state = addrValue.getState();
String zip = addrValue.getZip();
Integer addressID = addrValue.getId();
setAddress(addressID, street,city,state,zip);
|
public void | setEntityContext(javax.ejb.EntityContext ec)
context = 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 void | unsetEntityContext()
|