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 = usergroup.getId();
                if (findUsergroup(id) == null) {
                    throw new NonexistentEntityException("The usergroup with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here


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

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

            EquippedSkill equippedSkill;
            try {
                equippedSkill = em.getReference(EquippedSkill.class, id);
                equippedSkill.getEquippedSkillPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The equippedSkill with id " + id + " no longer exists.", enfe);
            }
            Skill skill = equippedSkill.getSkill();
            if (skill != null) {
                skill.getEquippedSkillCollection().remove(equippedSkill);
                skill = em.merge(skill);
View Full Code Here

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

            Spawnpoint spawnpoint;
            try {
                spawnpoint = em.getReference(Spawnpoint.class, id);
                spawnpoint.getSpawnpointPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The spawnpoint with id " + id + " no longer exists.", enfe);
            }
            Map map = spawnpoint.getMap();
            if (map != null) {
                map.getSpawnpointCollection().remove(spawnpoint);
                map = em.merge(map);
View Full Code Here

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

            Character character;
            try {
                character = em.getReference(Character.class, id);
                character.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The character with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Collection<EquippedSkill> equippedSkillCollectionOrphanCheck = character.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) {
                ItemstatPK id = itemstat.getItemstatPK();
                if (findItemstat(id) == null) {
                    throw new NonexistentEntityException("The itemstat with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            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);
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.