Examples of Factionstat


Examples of gwlpr.database.entities.Factionstat

        factionstat.getFactionstatPK().setAccountID(factionstat.getAccount().getId());
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Factionstat persistentFactionstat = em.find(Factionstat.class, factionstat.getFactionstatPK());
            Faction factionOld = persistentFactionstat.getFaction();
            Faction factionNew = factionstat.getFaction();
            Account accountOld = persistentFactionstat.getAccount();
            Account accountNew = factionstat.getAccount();
            if (factionNew != null) {
                factionNew = em.getReference(factionNew.getClass(), factionNew.getId());
                factionstat.setFaction(factionNew);
            }
View Full Code Here

Examples of gwlpr.database.entities.Factionstat

    public void destroy(FactionstatPK id) throws NonexistentEntityException {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Factionstat factionstat;
            try {
                factionstat = em.getReference(Factionstat.class, id);
                factionstat.getFactionstatPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The factionstat with id " + id + " no longer exists.", enfe);
            }
            Faction faction = factionstat.getFaction();
            if (faction != null) {
                faction.getFactionstatCollection().remove(factionstat);
                faction = em.merge(faction);
            }
            Account account = factionstat.getAccount();
            if (account != null) {
                account.getFactionstatCollection().remove(factionstat);
                account = em.merge(account);
            }
            em.remove(factionstat);
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.