Examples of commitTx()


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

        PersistenceService persistenceSvc = PersistenceService.getInstance();
        try {
            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()

    public void delete() {
        PersistenceService persistenceSvc = PersistenceService.getInstance();
        try {
            persistenceSvc.beginTx();
            deleteEntity(getEntity());
            persistenceSvc.commitTx();
        } finally {
            persistenceSvc.close();
        }
    }
View Full Code Here

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

            persistenceSvc.beginTx();
            User updatedUser = getEntity();
            updatedUser.setPassword(password);
            updatedUser.setRequiresReset(Boolean.TRUE);
            updateEntity(getEntity(), updatedUser);
            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();
            Weight entity = data.resolveEntity(em);
            createEntity(data.resolveEntity(em));
            persistenceSvc.commitTx();
            return Response.created(uriInfo.getAbsolutePath().resolve(entity.getWeightId() + "/")).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()

            }

            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
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.