Package gwlpr.database.entities

Examples of gwlpr.database.entities.Storagetab


        storagetab.getStoragetabPK().setAccountID(storagetab.getAccount().getId());
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Storagetab persistentStoragetab = em.find(Storagetab.class, storagetab.getStoragetabPK());
            Inventory inventoryIDOld = persistentStoragetab.getInventoryID();
            Inventory inventoryIDNew = storagetab.getInventoryID();
            Account accountOld = persistentStoragetab.getAccount();
            Account accountNew = storagetab.getAccount();
            if (inventoryIDNew != null) {
                inventoryIDNew = em.getReference(inventoryIDNew.getClass(), inventoryIDNew.getId());
                storagetab.setInventoryID(inventoryIDNew);
            }
View Full Code Here


    public void destroy(StoragetabPK id) throws NonexistentEntityException {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Storagetab storagetab;
            try {
                storagetab = em.getReference(Storagetab.class, id);
                storagetab.getStoragetabPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The storagetab with id " + id + " no longer exists.", enfe);
            }
            Inventory inventoryID = storagetab.getInventoryID();
            if (inventoryID != null) {
                inventoryID.getStoragetabCollection().remove(storagetab);
                inventoryID = em.merge(inventoryID);
            }
            Account account = storagetab.getAccount();
            if (account != null) {
                account.getStoragetabCollection().remove(storagetab);
                account = em.merge(account);
            }
            em.remove(storagetab);
View Full Code Here

TOP

Related Classes of gwlpr.database.entities.Storagetab

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.