/** @ejb.interface-method */
 public Dataset moveStudyToTrash(String iuid) throws RemoteException {
   try {
     StudyLocal study = studyHome.findByStudyIuid(iuid);
     if (study != null) return moveStudyToTrash(study.getPk().longValue());
     else return null;
   } catch (EJBException e) {
     throw new RemoteException(e.getMessage());
   } catch (FinderException e) {
     throw new RemoteException(e.getMessage());
   }
 }
  /**
   * @ejb.interface-method
   * @ejb.transaction type="Never"
   */
  public int updateReferringPhysicianNameSoundex() {
    if (!AttributeFilter.isSoundexEnabled()) return 0;

    try {
      Collection<StudyLocal> c = studyHome.findAll();
      LOG.info("Start updating Referring Physician Name Soundex codes");
      SoundexUpdateLocal ejb = (SoundexUpdateLocal) ctx.getEJBLocalObject();
      for (StudyLocal study : c) {
        ejb.updateReferringPhysicianNameSoundex(study);
      }
      LOG.info("Finished updating Referring Physician Name Soundex codes");
      return c.size();
    } catch (FinderException e) {
      throw new EJBException(e);
    }
  }
 /** @ejb.interface-method */
 public Dataset moveStudyToTrash(long study_pk) throws RemoteException {
   try {
     StudyLocal study = studyHome.findByPrimaryKey(new Long(study_pk));
     Dataset ds = getStudyMgtDataset(study, null);
     getPrivateStudy(study, DELETED, null, true);
     study.remove();
     return ds;
   } catch (CreateException e) {
     throw new RemoteException(e.getMessage());
   } catch (EJBException e) {
     throw new RemoteException(e.getMessage());
   } catch (FinderException e) {
     throw new RemoteException(e.getMessage());
   } catch (RemoveException e) {
     throw new RemoteException(e.getMessage());
   }
 }