Examples of commitTx()


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

                getEntities(start, max, source, orderBy, desc),
                uriInfo.getAbsolutePath(),
                Api.DEFAULT_EXPAND_LEVEL
            );
        } finally {
            persistenceSvc.commitTx();
            persistenceSvc.close();
        }
    }

    /**
 
View Full Code Here

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

           
            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            Pain entity = data.resolveEntity(em);
            createEntity(data.resolveEntity(em));
            persistenceSvc.commitTx();
            return Response.created(uriInfo.getAbsolutePath().resolve(entity.getPainId() + "/")).build();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

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

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

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

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

                getEntities(start, max, source, orderBy, desc),
                uriInfo.getAbsolutePath(),
                Api.DEFAULT_EXPAND_LEVEL
            );
        } finally {
            persistenceSvc.commitTx();
            persistenceSvc.close();
        }
    }

    /**
 
View Full Code Here

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

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            Temperature entity = data.resolveEntity(em);
            createEntity(data.resolveEntity(em));
            persistenceSvc.commitTx();
            return Response.created(uriInfo.getAbsolutePath().resolve(entity.getTemperatureId() + "/")).build();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

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

                    getEntities(start, max, source, orderBy, desc),
                    uriInfo.getAbsolutePath(),
                    Api.DEFAULT_EXPAND_LEVEL
            );
        } finally {
            persistenceSvc.commitTx();
            persistenceSvc.close();
        }
    }

    /**
 
View Full Code Here

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

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            HeartRate entity = data.resolveEntity(em);
            createEntity(data.resolveEntity(em));
            persistenceSvc.commitTx();
            return Response.created(uriInfo.getAbsolutePath().resolve(entity.getHeartRateId() + "/")).build();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

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

                     if (shouldRemove) {
                        healthRecords.remove(toRemove);
                        userToDisallow.setHealthRecords(healthRecords);
                        em.flush();
                        persistenceSvc.commitTx();
                        returnType = true;
                     } else {
                         returnType = false;
                         persistenceSvc.rollbackTx();
                     }
View Full Code Here

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

                //delete the request now that it is satisfied
                em.remove(approvedRequest);
            }

            persistenceSvc.commitTx();
            approvalRequest = "success";
        } catch (Exception ex) {
            logger.error("Exception encountered processing approval request: {}", ex);
            approvalRequest = "error";
        } finally {
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.