public boolean select(String whereclause) { boolean result = super.select(whereclause); if (result) { currAdd.setFk_PersonID(this.personID); permAdd.setFk_PersonID(this.personID); currAdd.setAddressType(Address.CURRENT_ADDRESS); permAdd.setAddressType(Address.PERMANENT_ADDRESS); if (!currAdd.select()) { currAdd.persist(); } if (!permAdd.select()) { permAdd.persist(); } } return result; }
public void updateNoDate() { super.update(); currAdd.setFk_PersonID(this.personID); permAdd.setFk_PersonID(this.personID); currAdd.setAddressType(Address.CURRENT_ADDRESS); permAdd.setAddressType(Address.PERMANENT_ADDRESS); currAdd.persist(); permAdd.persist(); }
public boolean update() { setDateChanged(new Date()); setChangedBy("CRS"); boolean result = super.update(); currAdd.setFk_PersonID(this.personID); permAdd.setFk_PersonID(this.personID); currAdd.setAddressType(Address.CURRENT_ADDRESS); permAdd.setAddressType(Address.PERMANENT_ADDRESS); currAdd.update(); permAdd.update(); return result; }
public String getCity() { return currAdd.getCity(); }
public String getPermanentCity() { return permAdd.getCity(); }
public void setPermanentPhone(String permanentPhone) { permAdd.setHomePhone(permanentPhone); }
public boolean delete() { currAdd.delete(); permAdd.delete(); return super.delete(); }
public void setPermanentZip(String permanentZip) { permAdd.setZip(permanentZip); }
public void setPermanentCountry(String permanentCountry) { permAdd.setCountry(permanentCountry); }
public String getCountry() { return currAdd.getCountry(); }
public void setPermanentState(String permanentState) { permAdd.setState(permanentState); }
public String getZip() { return currAdd.getZip(); }
public void setZip(String zip) { currAdd.setZip(zip); }
public void setState(String state) { currAdd.setState(state); }
public String getState() { return currAdd.getState(); }
public void setCity(String city) { currAdd.setCity(city); }
public void setPermanentCity(String permanentCity) { permAdd.setCity(permanentCity); }
public void setCountry(String country) { currAdd.setCountry(country); }
public String getPermanentState() { return permAdd.getState(); }
public String getHomePhone() { return currAdd.getHomePhone(); }
public String getPermanentZip() { return permAdd.getZip(); }
public void setHomePhone(String homePhone) { currAdd.setHomePhone(homePhone); }
public String getPermanentCountry() { return permAdd.getCountry(); }
public void setPermanentAddress1(String permanentAddress1) { permAdd.setAddress1(permanentAddress1); }
public String getPermanentPhone() { return permAdd.getHomePhone(); }
public void setAddress1(String address1) { currAdd.setAddress1(address1); }
public String getAddress2() { return currAdd.getAddress2(); }
public void setPermanentAddress2(String permanentAddress2) { permAdd.setAddress2(permanentAddress2); }
public String getPermanentAddress2() { return permAdd.getAddress2(); }
public void setAddress2(String address2) { currAdd.setAddress2(address2); }