Examples of PreexistingEntityException


Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                inventory = em.merge(inventory);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findStoreditem(storeditem.getStoreditemPK()) != null) {
                throw new PreexistingEntityException("Storeditem " + storeditem + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                usergroupCollectionUsergroup = em.merge(usergroupCollectionUsergroup);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findCommand(command.getName()) != null) {
                throw new PreexistingEntityException("Command " + command + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                account = em.merge(account);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findStoragetab(storagetab.getStoragetabPK()) != null) {
                throw new PreexistingEntityException("Storagetab " + storagetab + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                character = em.merge(character);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findEquippedSkill(equippedSkill.getEquippedSkillPK()) != null) {
                throw new PreexistingEntityException("EquippedSkill " + equippedSkill + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                map = em.merge(map);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findSpawnpoint(spawnpoint.getSpawnpointPK()) != null) {
                throw new PreexistingEntityException("Spawnpoint " + spawnpoint + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                item = em.merge(item);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findItemstat(itemstat.getItemstatPK()) != null) {
                throw new PreexistingEntityException("Itemstat " + itemstat + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                }
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findAccount(account.getEMail()) != null) {
                throw new PreexistingEntityException("Account " + account + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                attribute = em.merge(attribute);
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findAttributepoint(attributepoint.getAttributepointPK()) != null) {
                throw new PreexistingEntityException("Attributepoint " + attributepoint + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

                }
            }
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findAttribute(attribute.getId()) != null) {
                throw new PreexistingEntityException("Attribute " + attribute + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here

Examples of gwlpr.database.jpa.exceptions.PreexistingEntityException

            em.getTransaction().begin();
            em.persist(hstring);
            em.getTransaction().commit();
        } catch (Exception ex) {
            if (findHstring(hstring.getHstringPK()) != null) {
                throw new PreexistingEntityException("Hstring " + hstring + " already exists.", ex);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.