/** @ejb.interface-method */
 public void deleteAll(int privateType) throws RemoteException {
   try {
     Collection c = privPatHome.findByPrivateType(privateType);
     for (Iterator iter = c.iterator(); iter.hasNext(); ) {
       privPatHome.remove(((PrivatePatientLocal) iter.next()).getPk());
     }
   } catch (EJBException e) {
     throw new RemoteException(e.getMessage());
   } catch (RemoveException e) {
     throw new RemoteException(e.getMessage());
   } catch (FinderException e) {
     throw new RemoteException(e.getMessage());
   }
 }
 /** @ejb.interface-method */
 public void deletePrivatePatient(long patient_pk) throws RemoteException {
   try {
     privPatHome.remove(new Long(patient_pk));
   } catch (EJBException e) {
     throw new RemoteException(e.getMessage());
   } catch (RemoveException e) {
     throw new RemoteException(e.getMessage());
   }
 }
 private PrivatePatientLocal getPrivatePatient(
     PatientLocal patient, int type, boolean includeStudies)
     throws FinderException, CreateException {
   Collection col =
       privPatHome.findByPatientIdWithIssuer(
           type, patient.getPatientId(), patient.getIssuerOfPatientId());
   PrivatePatientLocal privPat;
   if (col.isEmpty()) {
     privPat = privPatHome.create(type, patient.getAttributes(true));
   } else {
     privPat = (PrivatePatientLocal) col.iterator().next();
   }
   if (includeStudies) {
     for (Iterator iter = patient.getStudies().iterator(); iter.hasNext(); ) {
       getPrivateStudy((StudyLocal) iter.next(), type, privPat, true); // move
       // also
       // all
       // instances
     }
   }
   return privPat;
 }