Package gwlpr.database.jpa.exceptions

Examples of gwlpr.database.jpa.exceptions.IllegalOrphanException


                    }
                    illegalOrphanMessages.add("You must retain Spawnpoint " + spawnpointCollectionOldSpawnpoint + " since its map field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Spawnpoint> attachedSpawnpointCollectionNew = new ArrayList<Spawnpoint>();
            for (Spawnpoint spawnpointCollectionNewSpawnpointToAttach : spawnpointCollectionNew) {
                spawnpointCollectionNewSpawnpointToAttach = em.getReference(spawnpointCollectionNewSpawnpointToAttach.getClass(), spawnpointCollectionNewSpawnpointToAttach.getSpawnpointPK());
                attachedSpawnpointCollectionNew.add(spawnpointCollectionNewSpawnpointToAttach);
View Full Code Here


                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Map (" + map + ") cannot be destroyed since the Spawnpoint " + spawnpointCollectionOrphanCheckSpawnpoint + " in its spawnpointCollection field has a non-nullable map field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Character> characterCollection = map.getCharacterCollection();
            for (Character characterCollectionCharacter : characterCollection) {
                characterCollectionCharacter.setLastOutpost(null);
                characterCollectionCharacter = em.merge(characterCollectionCharacter);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Attribute " + attributeCollectionOldAttribute + " since its profession field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Character> attachedCharacterCollectionNew = new ArrayList<Character>();
            for (Character characterCollectionNewCharacterToAttach : characterCollectionNew) {
                characterCollectionNewCharacterToAttach = em.getReference(characterCollectionNewCharacterToAttach.getClass(), characterCollectionNewCharacterToAttach.getId());
                attachedCharacterCollectionNew.add(characterCollectionNewCharacterToAttach);
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Profession (" + profession + ") cannot be destroyed since the Attribute " + attributeCollectionOrphanCheckAttribute + " in its attributeCollection field has a non-nullable profession field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Character> characterCollection = profession.getCharacterCollection();
            for (Character characterCollectionCharacter : characterCollection) {
                characterCollectionCharacter.getProfessionCollection().remove(profession);
                characterCollectionCharacter = em.merge(characterCollectionCharacter);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Item " + itemCollectionOldItem + " since its baseID field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Collection<Item> attachedItemCollectionNew = new ArrayList<Item>();
            for (Item itemCollectionNewItemToAttach : itemCollectionNew) {
                itemCollectionNewItemToAttach = em.getReference(itemCollectionNewItemToAttach.getClass(), itemCollectionNewItemToAttach.getId());
                attachedItemCollectionNew.add(itemCollectionNewItemToAttach);
View Full Code Here

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

                    }
                    illegalOrphanMessages.add("You must retain Attributepoint " + attributepointCollectionOldAttributepoint + " since its character field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            if (secondaryProfessionNew != null) {
                secondaryProfessionNew = em.getReference(secondaryProfessionNew.getClass(), secondaryProfessionNew.getId());
                character.setSecondaryProfession(secondaryProfessionNew);
            }
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Character (" + character + ") cannot be destroyed since the Attributepoint " + attributepointCollectionOrphanCheckAttributepoint + " in its attributepointCollection field has a non-nullable character field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Profession secondaryProfession = character.getSecondaryProfession();
            if (secondaryProfession != null) {
                secondaryProfession.getCharacterCollection().remove(character);
                secondaryProfession = em.merge(secondaryProfession);
View Full Code Here

                    }
                    illegalOrphanMessages.add("You must retain Character " + characterCollectionOldCharacter + " since its accountID field is not nullable.");
                }
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            if (userGroupNew != null) {
                userGroupNew = em.getReference(userGroupNew.getClass(), userGroupNew.getId());
                account.setUserGroup(userGroupNew);
            }
View Full Code Here

                    illegalOrphanMessages = new ArrayList<String>();
                }
                illegalOrphanMessages.add("This Account (" + account + ") cannot be destroyed since the Character " + characterCollectionOrphanCheckCharacter + " in its characterCollection field has a non-nullable accountID field.");
            }
            if (illegalOrphanMessages != null) {
                throw new IllegalOrphanException(illegalOrphanMessages);
            }
            Usergroup userGroup = account.getUserGroup();
            if (userGroup != null) {
                userGroup.getAccountCollection().remove(account);
                userGroup = em.merge(userGroup);
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.