Examples of PersistenceViolationException


Examples of com.evasion.exception.PersistenceViolationException

        LOGGER.debug("Create an account for user: {}", account.getUser().getUsername());
        try {
            accountDAO.persist(account);
        } catch (Exception e) {
            LOGGER.error("Erreur dans la validation du compte utilisateur", e);
            throw new PersistenceViolationException("Erreur dans la validation du compte utilisateur", e.fillInStackTrace());
        }
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        validGrantedAuthority(u);
        encodPassword(u);
        if (findAccountByUserName(u.getUsername()) == null) {
            em.persist(u);
        } else {
            throw new PersistenceViolationException("user already exists");
        }
        return u;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

                return new UserDetailsAdapter(account);
            } else {
                return null;
            }
        } catch (Exception e) {
            throw new PersistenceViolationException("Erreur lors de l'identification du login '" + login + "' en persistence");
        }
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        try {
            em.persist(account);
            em.flush();
        } catch (Exception e) {
            LOGGER.error("Erreur dans la validation du compte utilisateur", e);
            throw new PersistenceViolationException("Erreur dans la validation du compte utilisateur", e.fillInStackTrace());
        }
        return account;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        try {
            em.persist(account);
            em.flush();
        } catch (Exception e) {
            LOGGER.error("Erreur dans la validation du compte utilisateur", e);
            throw new PersistenceViolationException("Erreur dans la validation du compte utilisateur", e.fillInStackTrace());
        }
        return account;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

    }
   
    @Override
    public Long savePromesse(Person p, Long l, String d) throws PersistenceViolationException {
        if (l == null || l <= 0L) {
            throw new PersistenceViolationException("le montant ne peut etre null ou <=0");
        }
        Don don = new Don(p, l, d);
        try {
            em.persist(don);
            em.flush();
            return don.getId();
        } catch (Exception e) {
            throw new PersistenceViolationException("Save promesse en Echec", e);
        }
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        try {
                em.merge(newPartenaire.getPerson());
                newPartenaire = em.merge(newPartenaire);
            em.flush();
        } catch (Exception e) {
            throw new PersistenceViolationException("Erreur dans la validation. ", e.fillInStackTrace());
        }
        return newPartenaire;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        (new PersonEJB(em)).createPerson(account.getPerson());
        try {
            em.persist(account);
            em.flush();
        } catch (Exception e) {
            throw new PersistenceViolationException("Erreur dans la validation du compte utilisateur", e.fillInStackTrace());
        }
        return account;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

        try {
            em.merge(newPartenaire.getPerson());
            newPartenaire = em.merge(newPartenaire);
            em.flush();
        } catch (Exception e) {
            throw new PersistenceViolationException("Erreur dans la validation. ", e.fillInStackTrace());
        }
        return newPartenaire;
    }
View Full Code Here

Examples of com.evasion.exception.PersistenceViolationException

            } else {
                newPage = em.merge(newPage);
            }
            em.flush();
        } catch (Exception e) {
            throw new PersistenceViolationException("Erreur dans la validation de la page statique", e.fillInStackTrace());
        }
        return newPage;
    }
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.