115116117118119120121122123124125
} List<Diagnosis> diagnosis = (List<Diagnosis>)query.executeWithArray(objs); result = parseEntityDisplay(diagnosis); } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } } return result;
152153154155156157158159
pm.currentTransaction().rollback(); result = result + e.toString(); } if(!result.isEmpty()) { throw new ServerException(result); } }
165166167168169170171172173174
try { diagnosis = pm.getObjectById(Diagnosis.class, id); } catch(Exception e) { throw new ServerException(e.toString()); } return diagnosis; }
188189190191192193194195196197198
List<Diagnosis> diagnosis = (List<Diagnosis>)query.execute(id); result = parseEntityDisplay(diagnosis); } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } return result;
214215216217218219220221222223224
diagnosis = (List<Diagnosis>)query.execute(patient,fetal); result = parseEntityForReport(diagnosis); } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } return result;
237238239240241242243244245246247
query.setOrdering("firstname asc"); result = (List<Diagnosis>) query.execute(); result = Lists.newArrayList(pm.detachCopyAll(result)); } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } return result;
276277278279280281282283284285286
// patient.getEmail(),patient.getNotes()})); // } result = parseEntityDisplay(diagnosis); } } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } return result;
339340341342343344345346347348
Query query1 = pm.newQuery(Diagnosis.class); List<Diagnosis> diagnosis1 = (List<Diagnosis>) query1.execute(); try { pm.deletePersistentAll(diagnosis1); } catch(Exception e) { throw new ServerException(e.toString()); } finally { pm.close(); } }
403404405406407408409410411412413
pm.currentTransaction().begin(); pm.makePersistent(diagnosis); pm.currentTransaction().commit(); } catch(Exception e) { pm.currentTransaction().rollback(); throw new ServerException(e.toString()); } finally { pm.close(); } } return diagnosis;
427428429430431432433434435436
} } catch(Exception e) { result = result + e.toString(); } if(!result.isEmpty()) { throw new ServerException(result); } } }