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


            Item item;
            try {
                item = em.getReference(Item.class, id);
                item.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The item with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Collection<Itemstat> itemstatCollectionOrphanCheck = item.getItemstatCollection();
            for (Itemstat itemstatCollectionOrphanCheckItemstat : itemstatCollectionOrphanCheck) {
                if (illegalOrphanMessages == null) {
View Full Code Here

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

            Inventory inventory;
            try {
                inventory = em.getReference(Inventory.class, id);
                inventory.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The inventory with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Collection<Storagetab> storagetabCollectionOrphanCheck = inventory.getStoragetabCollection();
            for (Storagetab storagetabCollectionOrphanCheckStoragetab : storagetabCollectionOrphanCheck) {
                if (illegalOrphanMessages == null) {
View Full Code Here

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

            Weapon weapon;
            try {
                weapon = em.getReference(Weapon.class, id);
                weapon.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The weapon with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Collection<Npc> npcCollectionOrphanCheck = weapon.getNpcCollection();
            for (Npc npcCollectionOrphanCheckNpc : npcCollectionOrphanCheck) {
                if (illegalOrphanMessages == null) {
View Full Code Here

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

            Npc npc;
            try {
                npc = em.getReference(Npc.class, id);
                npc.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The npc with id " + id + " no longer exists.", enfe);
            }
            Weapon weapons = npc.getWeapons();
            if (weapons != null) {
                weapons.getNpcCollection().remove(npc);
                weapons = em.merge(weapons);
View Full Code Here

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

            Weaponset weaponset;
            try {
                weaponset = em.getReference(Weaponset.class, id);
                weaponset.getWeaponsetPK();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The weaponset with id " + id + " no longer exists.", enfe);
            }
            Weapon weapons = weaponset.getWeapons();
            if (weapons != null) {
                weapons.getWeaponsetCollection().remove(weaponset);
                weapons = em.merge(weapons);
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.