Package gwlpr.database.jpa.exceptions

Examples of gwlpr.database.jpa.exceptions.NonexistentEntityException


        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = level.getLevel();
                if (findLevel(id) == null) {
                    throw new NonexistentEntityException("The level with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here


            Level level;
            try {
                level = em.getReference(Level.class, id);
                level.getLevel();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The level with id " + id + " no longer exists.", enfe);
            }
            Collection<Character> characterCollection = level.getCharacterCollection();
            for (Character characterCollectionCharacter : characterCollection) {
                characterCollectionCharacter.setLevel(null);
                characterCollectionCharacter = em.merge(characterCollectionCharacter);
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                FactionstatPK id = factionstat.getFactionstatPK();
                if (findFactionstat(id) == null) {
                    throw new NonexistentEntityException("The factionstat with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            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);
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = skill.getId();
                if (findSkill(id) == null) {
                    throw new NonexistentEntityException("The skill with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Skill skill;
            try {
                skill = em.getReference(Skill.class, id);
                skill.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The skill with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Collection<EquippedSkill> equippedSkillCollectionOrphanCheck = skill.getEquippedSkillCollection();
            for (EquippedSkill equippedSkillCollectionOrphanCheckEquippedSkill : equippedSkillCollectionOrphanCheck) {
                if (illegalOrphanMessages == null) {
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                StoreditemPK id = storeditem.getStoreditemPK();
                if (findStoreditem(id) == null) {
                    throw new NonexistentEntityException("The storeditem with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Storeditem storeditem;
            try {
                storeditem = em.getReference(Storeditem.class, id);
                storeditem.getStoreditemPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The storeditem with id " + id + " no longer exists.", enfe);
            }
            Item itemID = storeditem.getItemID();
            if (itemID != null) {
                itemID.getStoreditemCollection().remove(storeditem);
                itemID = em.merge(itemID);
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                String id = command.getName();
                if (findCommand(id) == null) {
                    throw new NonexistentEntityException("The command with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Command command;
            try {
                command = em.getReference(Command.class, id);
                command.getName();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The command with id " + id + " no longer exists.", enfe);
            }
            Collection<Usergroup> usergroupCollection = command.getUsergroupCollection();
            for (Usergroup usergroupCollectionUsergroup : usergroupCollection) {
                usergroupCollectionUsergroup.getCommandCollection().remove(command);
                usergroupCollectionUsergroup = em.merge(usergroupCollectionUsergroup);
View Full Code Here

TOP

Related Classes of gwlpr.database.jpa.exceptions.NonexistentEntityException

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.