Package com.evasion.entity

Examples of com.evasion.entity.Individual


                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
View Full Code Here


    public PersonEJB(EntityManager em) {
        this.em = em;
    }

    public Long saveIndividual(Long id, Civilite civ, String nom, String prenom, Date naissance, String email) {
        Individual indiv;
        if (id == null) {
            indiv = new Individual(email, civ, nom, prenom, naissance);
            createPerson(indiv);
        } else {
            indiv = em.find(Individual.class, id);
            indiv.setTitre(civ);
            indiv.setNom(nom);
            indiv.setPrenom(prenom);
            indiv.setAnniversaire(naissance);
            indiv.setEmail(email);
            indiv = em.merge(indiv);
        }
        return indiv.getId();
    }
View Full Code Here

    }

    public String validPerson() {

        if ((type != null && type.equals("indiv")) || !prenom.isEmpty()) {
            personEntity = new Individual(email, convertCivilite(civilite), nom, prenom, naissance);
        } else if ((type != null && type.equals("corpo")) || !description.isEmpty()) {
            personEntity = new Corporation(nom, email, description);
        }
        return null;
    }
View Full Code Here

        this.em = em;
    }

    @Override
    public Long saveIndividual(Long id, Civilite civ, String nom, String prenom, Date naissance, String email) {
        Individual indiv;
        if (id == null) {
            indiv = new Individual(email, civ, nom, prenom, naissance);
            createPerson(indiv);
        } else {
            indiv = em.find(Individual.class, id);
            indiv.setTitre(civ);
            indiv.setNom(nom);
            indiv.setPrenom(prenom);
            indiv.setAnniversaire(naissance);
            indiv.setEmail(email);
            indiv = em.merge(indiv);
        }
        return indiv.getId();
    }
View Full Code Here

    }

    public String validPerson() {

        if ((type != null && type.equals("indiv")) || !prenom.isEmpty()) {
            personEntity = new Individual(email, convertCivilite(civilite), nom, prenom, naissance);
        } else if ((type != null && type.equals("corpo")) || !description.isEmpty()) {
            personEntity = new Corporation(nom, email, description);
        }
        return null;
    }
View Full Code Here

        this.em = em;
    }

    @Override
    public Long saveIndividual(Long id, Civilite civ, String nom, String prenom, Date naissance, String email) {
        Individual indiv;
        if (id == null) {
            indiv = new Individual(email, civ, nom, prenom, naissance);
            createPerson(indiv);
        } else {
            indiv = em.find(Individual.class, id);
            indiv.setTitre(civ);
            indiv.setNom(nom);
            indiv.setPrenom(prenom);
            indiv.setAnniversaire(naissance);
            indiv.setEmail(email);
            indiv = em.merge(indiv);
        }
        return indiv.getId();
    }
View Full Code Here

                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
View Full Code Here

                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
View Full Code Here

    }

    public String validPerson() {

        if ((type != null && type.equals("indiv")) || !prenom.isEmpty()) {
            personEntity = new Individual(email, convertCivilite(civilite), nom, prenom, naissance);
        } else if ((type != null && type.equals("corpo")) || !description.isEmpty()) {
            personEntity = new Corporation(nom, email, description);
            ((Corporation)personEntity).setSiteUrl(site);
        }
        return null;
View Full Code Here

TOP

Related Classes of com.evasion.entity.Individual

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.