Пример #1
0
 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();
 }
Пример #2
0
 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;
 }