Package gwlpr.database.entities

Examples of gwlpr.database.entities.Itemstat


        itemstat.getItemstatPK().setItemID(itemstat.getItem().getId());
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Itemstat persistentItemstat = em.find(Itemstat.class, itemstat.getItemstatPK());
            Item itemOld = persistentItemstat.getItem();
            Item itemNew = itemstat.getItem();
            if (itemNew != null) {
                itemNew = em.getReference(itemNew.getClass(), itemNew.getId());
                itemstat.setItem(itemNew);
            }
View Full Code Here


    public void destroy(ItemstatPK id) throws NonexistentEntityException {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Itemstat itemstat;
            try {
                itemstat = em.getReference(Itemstat.class, id);
                itemstat.getItemstatPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The itemstat with id " + id + " no longer exists.", enfe);
            }
            Item item = itemstat.getItem();
            if (item != null) {
                item.getItemstatCollection().remove(itemstat);
                item = em.merge(item);
            }
            em.remove(itemstat);
View Full Code Here

TOP

Related Classes of gwlpr.database.entities.Itemstat

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.