Package com.krminc.phr.dao

Examples of com.krminc.phr.dao.PersistenceService.commitTx()


            }

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            updateEntity(getEntity(), data.resolveEntity(em));
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here


                throw new WebApplicationException(Response.Status.FORBIDDEN);
            }
           
            persistenceSvc.beginTx();
            deleteEntity(getEntity());
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

            }
           
            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            updateEntity(getEntity(), data.resolveEntity(em));
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

                throw new WebApplicationException(Response.Status.FORBIDDEN);
            }
           
            persistenceSvc.beginTx();
            deleteEntity(getEntity());
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

            }

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            updateEntity(getEntity(), data.resolveEntity(em));
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

                throw new WebApplicationException(Response.Status.FORBIDDEN);
            }

            persistenceSvc.beginTx();
            deleteEntity(getEntity());
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

            }

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            updateEntity(getEntity(), data.resolveEntity(em));
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

                familyHistory.setWhoTuberculosis(whoTuberculosis);
               
                familyHistory.setDataSourceId(healthRecordId);

                em.merge(familyHistory);
                persistenceSvc.commitTx();
            } catch (Exception e) {
                logger.error("familyhistory Save Failed", e);
                res = false;
            } finally {
                persistenceSvc.close();
View Full Code Here

                nutritionInfo.setFoodDislikes(foodDislikes);
                nutritionInfo.setComments(comments);
                nutritionInfo.setDataSourceId(healthRecordId);

                em.merge(nutritionInfo);
                persistenceSvc.commitTx();
            } catch (Exception e) {
                logger.error("Nutrition Save Failed", e);
                res = false;
            } finally {
                persistenceSvc.close();
View Full Code Here

                        if (ii.getRespiratorycareId() != null) {
                            RespiratoryCare existingLog = em.find(RespiratoryCare.class, ii.getRespiratorycareId());
                            if (existingLog.getHealthRecordId().compareTo(healthRecordId) == 0) {
                                ii.setDataSourceId(healthRecordId);
                                em.merge(ii);
                                persistenceSvc.commitTx();
                            } else {
                                logger.error("Non-matching HRID on merge attempt");
                                res = false;
                            }
                        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.