/*
  * (non-Javadoc)
  *
  * @see net.metaship.swing.generic.ServerService#delete(net.metaship.generic.ValueObject)
  */
 public void delete(ValueObject vo) throws Exception {
   try {
     log.info("FacilityService deleting vo");
     getRemoteManager().delete(vo.getPK());
     vo.getClientValueObjectProxy().markForDeletion();
   } catch (LocalException e) {
     log.debug("Exception caught:", e);
     throw new RemoteException("LocalException while deleting!", e);
   }
 }
 /*
  * (non-Javadoc)
  *
  * @see net.metaship.swing.generic.ServerService#update(net.metaship.generic.ValueObject)
  */
 protected void update(ValueObject valueObject) throws Exception {
   super.update(valueObject);
   try {
     if (valueObject != null && valueObject instanceof Address) {
       Address address = (Address) findByPrimaryKey(valueObject.getPK());
       ((Address) valueObject).setZipcode(address.getZipcode());
       ((Address) valueObject).setLatitude(address.getLatitude());
       ((Address) valueObject).setLongitude(address.getLongitude());
     }
   } catch (Exception e) {
     log.warn(e);
   }
 }
 /**
  * @return null if no confirmation is needed or a String with the message to display in the
  *     confirmation dialog
  */
 public String deleteRequiresConfirmation(ValueObject vo) {
   // VERSION_TOGGLE Facility.warnOnCascadeDelete Start ----------
   if (ResourceUtil.getBoolean("Facility.warnOnCascadeDelete")) {
     try {
       if (getFacilityManager().otherDataDependsOnFacility(vo.getPK())) {
         return "Warning: Deletion of this facility will delete its service "
             + "area entries and other dependent data! Continue?";
       }
     } catch (Exception e) {
       log.error("Exception while checking otherDataDependsOnFacility: ", e);
     }
   }
   // VERSION_TOGGLE Facility.warnOnCascadeDelete End ----------
   return null;
 }
 /**
  * @param vo
  * @param user
  * @throws RemoteException
  * @throws Exception
  */
 public void delete(ValueObject vo, String user) throws RemoteException, Exception {
   getFacilityManager().delete(vo.getPK(), user);
 }