Package entity

Examples of entity.Tagrates


    public void edit(Tagrates tagrates) throws NonexistentEntityException, Exception {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Tagrates persistentTagrates = em.find(Tagrates.class, tagrates.getId());
            Coursetag courseTagIdOld = persistentTagrates.getCourseTagId();
            Coursetag courseTagIdNew = tagrates.getCourseTagId();
            if (courseTagIdNew != null) {
                courseTagIdNew = em.getReference(courseTagIdNew.getClass(), courseTagIdNew.getId());
                tagrates.setCourseTagId(courseTagIdNew);
            }
View Full Code Here


    public void destroy(Integer id) throws NonexistentEntityException {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Tagrates tagrates;
            try {
                tagrates = em.getReference(Tagrates.class, id);
                tagrates.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The tagrates with id " + id + " no longer exists.", enfe);
            }
            Coursetag courseTagId = tagrates.getCourseTagId();
            if (courseTagId != null) {
                courseTagId.getTagratesList().remove(tagrates);
                courseTagId = em.merge(courseTagId);
            }
            em.remove(tagrates);
View Full Code Here

TOP

Related Classes of entity.Tagrates

Copyright © 2018 www.massapicom. 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.