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 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; }