Package fr.aston.administration.metiers

Examples of fr.aston.administration.metiers.Employe


 

  public Employe getEmployeDAO(String login)
  {
    Employe employe=new Employe();
    employe.setLogin(login);
    employe.setNom("BOUCHON");
    return employe;
  }
View Full Code Here


 
    public Employe getEmployeDAO(String login)
    {
      // 1. R�cup�ration dans un ResultSet de l'employ� de la table employe via la login
      // SELECT * from employe where login = login
      Employe employe = new Employe();
      try {
        System.out.println("Appel DaoJDBC : m�thode(getEmployeDAOImpl)");
        String requete = "SELECT ID, login, password, nom, prenom, email, fonction from employe WHERE login = \"" + login + "\"";
        System.out.println(requete);
 
          Connection cn = FactoryPersistance.getConnection();
          Statement st=cn.createStatement();
          ResultSet resultSet = st.executeQuery(requete);
          resultSet.next();
     
        // 2. Injecter la requete dans l'objet employ�
       
 
        employe.setLogin(login);
        employe.setIdUtilisateur(resultSet.getInt("ID"));
        employe.setPassword(resultSet.getString("password"));
        employe.setNom(resultSet.getString("nom"));
        employe.setPrenom(resultSet.getString("prenom"));
        employe.setEmail(resultSet.getString("email"));
        employe.setFonction(resultSet.getString("fonction"));
   
        // 3. retourner l'objet Employ�
       
        System.out.println(employe);
       
View Full Code Here

public class TestManager extends TestCase
{
  public void testAffichageManager() {
    // Manager m1 = new Manager("Josiane", "Agn�s","agnes","123","josiane@aston.com", 100, e1, e2 );
  Employe e1 = new Employe("MARCEL", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
  Employe e2 = new Employe("JOSIANE", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
  Employe e3 = new Employe("GEORGES", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
 
   
  }
View Full Code Here

    // fail("Not yet implemented");
    // 1. Creation d'un tableau d'employ�s
   
   
    // 1.a Instanciation de plusieurs employ�s
    Employe e1 = new Employe("MARCEL", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e2 = new Employe("JOSIANE", "Agnes", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e3 = new Employe("GEORGES", "Jules", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
   
   
    // 1.b Instanciation du tableau et affectation des employ�s � ce tableau
    Employe [] te = new Employe[3];
    te[0]=e1;
View Full Code Here

   * M�thode de test pour le super manager
   */
  public void testSuperManager() { // contient des managers qui ont des employ�s (r�cursifs)
   
 
    Employe e1 = new Employe("MARCEL", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e2 = new Employe("JOSIANE", "Agnes", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e3 = new Employe("GEORGES", "Jules", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
   
    Employe e4 = new Employe("KEVIN", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e5 = new Employe("LOGAN", "Agnes", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e6 = new Employe("JONNHY", "Jules", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
   
    Employe [] te = new Employe[3];
    te[0]=e1;
    te[1]=e2;
    te[2]=e3;
View Full Code Here

   * M�thode de test pour le super manager avec utilisation d'ArrayList
   */
  public void testSuperManager2() {
   
 
    Employe e1 = new Employe("MARCEL", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e2 = new Employe("JOSIANE", "Agnes", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e3 = new Employe("GEORGES", "Jules", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
   
    Employe e4 = new Employe("KEVIN", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e5 = new Employe("LOGAN", "Agnes", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    Employe e6 = new Employe("JONNHY", "Jules", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
   
    Employe [] te = new Employe[3];
    te[0]=e1;
    te[1]=e2;
    te[2]=e3;
View Full Code Here

public class TestEmploye extends TestCase
{
// C�ation d'une m�thode de test
  public void testAffichageEmploye(){ // il faut que ca commence par test pour Junit
    // 1. Cr�ation d'un employ� avec l'ensemble de ses attributs
    Employe e1 = new Employe("MARCEL", "Jacques", new Date("12/12/1956"), "dupont", "1234", "marcel@aston.com", 1);
    System.out.println(e1);
   
   
   
    // 2. Affichage des atributs de l'employ�
View Full Code Here

TOP

Related Classes of fr.aston.administration.metiers.Employe

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.