Package gwlpr.database.jpa.exceptions

Examples of gwlpr.database.jpa.exceptions.IllegalOrphanException


                    }
                    illegalOrphanMessages.add("You must retain Weapon " + weaponCollection1OldWeapon + " since its leadhand field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            if (customizedForNew != null) {
                customizedForNew = em.getReference(customizedForNew.getClass(), customizedForNew.getId());
                item.setCustomizedFor(customizedForNew);
            }
View Full Code Here


                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Item (" + item + ") cannot be destroyed since the Weapon " + weaponCollection1OrphanCheckWeapon + " in its weaponCollection1 field has a non-nullable leadhand field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Character customizedFor = item.getCustomizedFor();
            if (customizedFor != null) {
                customizedFor.getItemCollection().remove(item);
                customizedFor = em.merge(customizedFor);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Storeditem " + storeditemCollectionOldStoreditem + " since its inventory field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Account> attachedAccountCollectionNew = new ArrayList<Account>();
            for (Account accountCollectionNewAccountToAttach : accountCollectionNew) {
                accountCollectionNewAccountToAttach = em.getReference(accountCollectionNewAccountToAttach.getClass(), accountCollectionNewAccountToAttach.getEMail());
                attachedAccountCollectionNew.add(accountCollectionNewAccountToAttach);
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Inventory (" + inventory + ") cannot be destroyed since the Storeditem " + storeditemCollectionOrphanCheckStoreditem + " in its storeditemCollection field has a non-nullable inventory field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Account> accountCollection = inventory.getAccountCollection();
            for (Account accountCollectionAccount : accountCollection) {
                accountCollectionAccount.setMaterialStorage(null);
                accountCollectionAccount = em.merge(accountCollectionAccount);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Weaponset " + weaponsetCollectionOldWeaponset + " since its weapons field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            if (offhandNew != null) {
                offhandNew = em.getReference(offhandNew.getClass(), offhandNew.getId());
                weapon.setOffhand(offhandNew);
            }
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Weapon (" + weapon + ") cannot be destroyed since the Weaponset " + weaponsetCollectionOrphanCheckWeaponset + " in its weaponsetCollection field has a non-nullable weapons field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Item offhand = weapon.getOffhand();
            if (offhand != null) {
                offhand.getWeaponCollection().remove(weapon);
                offhand = em.merge(offhand);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain EquippedSkill " + equippedSkillCollectionOldEquippedSkill + " since its skill field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            if (attributeNew != null) {
                attributeNew = em.getReference(attributeNew.getClass(), attributeNew.getId());
                skill.setAttribute(attributeNew);
            }
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Skill (" + skill + ") cannot be destroyed since the EquippedSkill " + equippedSkillCollectionOrphanCheckEquippedSkill + " in its equippedSkillCollection field has a non-nullable skill field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Attribute attribute = skill.getAttribute();
            if (attribute != null) {
                attribute.getSkillCollection().remove(skill);
                attribute = em.merge(attribute);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Factionstat " + factionstatCollectionOldFactionstat + " since its faction field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Factionstat> attachedFactionstatCollectionNew = new ArrayList<Factionstat>();
            for (Factionstat factionstatCollectionNewFactionstatToAttach : factionstatCollectionNew) {
                factionstatCollectionNewFactionstatToAttach = em.getReference(factionstatCollectionNewFactionstatToAttach.getClass(), factionstatCollectionNewFactionstatToAttach.getFactionstatPK());
                attachedFactionstatCollectionNew.add(factionstatCollectionNewFactionstatToAttach);
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Faction (" + faction + ") cannot be destroyed since the Factionstat " + factionstatCollectionOrphanCheckFactionstat + " in its factionstatCollection field has a non-nullable faction field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            em.remove(faction);
            em.getTransaction().commit();
        } finally {
            if (em != null) {
View Full Code Here

TOP

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

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.