Package fr.utbm.in56.annonces.dao

Examples of fr.utbm.in56.annonces.dao.DepartementDao


        HttpSession session = request.getSession();
       
        Object oAnnonce = session.getAttribute("annonce");
        if(oAnnonce instanceof Annonce){
           
            Annonce annonce = (Annonce)session.getAttribute("annonce");
            m.setAnnonce(annonce);
            m.setDestinataire(annonce.getPublicateur());
           
        }else{
            Message message = (Message)session.getAttribute("message");
            m.setAnnonce(message.getAnnonce());
            m.setDestinataire(message.getExpediteur());
View Full Code Here


   
        long idAnnonce = Long.decode(request.getParameter("id"));

        AnnonceDao dao = new AnnonceDao();

        Annonce annonce = dao.getById(idAnnonce);

        SimpleDateFormat dateformatMMDDYYYY = new SimpleDateFormat("MM/dd/yyyy");
        String stDate = dateformatMMDDYYYY.format(annonce.getDateDepot().getTime());

        request.getSession().setAttribute("date", stDate);       
        request.getSession().setAttribute("annonce", annonce);       
        request.getSession().setAttribute("message", "")
       
View Full Code Here

       
        AnnonceDao dao = new AnnonceDao();
        StatutDao sDao = new StatutDao();
       
       
        Annonce annonce = dao.getById(idAnnonce);
       
        annonce.setStatut(sDao.getById(2));
       
        dao.update(annonce);
       
        return mapping.findForward("default");
View Full Code Here

    private void initCategories() {
       
        CategorieDao categorieDao = new CategorieDao();
       
        if(categorieDao.getAll().isEmpty()) {
            categorieDao.save(new Categorie("Automobile"));
            categorieDao.save(new Categorie("Moto"));
            categorieDao.save(new Categorie("Immobilier"));
            categorieDao.save(new Categorie("Meubles"));
            categorieDao.save(new Categorie("Informatique"));
            categorieDao.save(new Categorie("Electoménager"));
            categorieDao.save(new Categorie("Divers"));
        }
    }
View Full Code Here

        AnnonceDao annoncesDao = new AnnonceDao();
        DepartementDao departementDao = new DepartementDao();
        CategorieDao categorieDao = new CategorieDao();
       
        Departement departement = departementDao.getById(chercherForm.getDepartement());
        Categorie categorie = categorieDao.getById(chercherForm.getCategorie());
       
        session.setAttribute("annonces", annoncesDao.getAnnonces(
                chercherForm.getPrixMin(),
                chercherForm.getPrixMax(),
                chercherForm.getRecherche(),
View Full Code Here

            ArrayList<Region> regions = new ArrayList<Region>();
            ArrayList<Departement> departements = new ArrayList<Departement>();

            regions.add(new Region("Alsace"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Bas-Rhin"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Haut-Rhin"));

            regions.add(new Region("Aquitaine"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Dordogne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Gironde"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Landes"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Lot-et-Garonne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Pyrénées-Atlantiques"));

            regions.add(new Region("Auvergne"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Allier"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Cantal"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Haute-Loire"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Puy-de-Dôme"));

            regions.add(new Region("Basse-Normandie"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Calvados"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Manche"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Orne"));

            regions.add(new Region("Bourgogne"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Côte-d'Or"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Nièvre"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Saône-et-Loire"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Yonne"));

            regions.add(new Region("Bretagne"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Côtes-d'Armor"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Finistère"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Ile-et-Vilaine"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Morbihan"));

            regions.add(new Region("Centre"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Cher"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Eure-et-Loir"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Indre"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Indre-et-Loir"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Loir-et-Cher"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Loiret"));

            regions.add(new Region("Champagne-Ardenne"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Ardennes"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Aube"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Marne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "haute-Marne"));

            regions.add(new Region("Corse"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Haute-Corse"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Basse-corse"));

            regions.add(new Region("Franche-Comté"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Doubs"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Jura"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Haute-Saône"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Territoire de Belfort"));

            regions.add(new Region("Haute-Normandie"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Seine-Maritime"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Eure"));

            regions.add(new Region("Île-de-France"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Paris"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Seine-et-Marne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Yvelines"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Essone"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Hauts-de-Seine"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Seine-Saint-Denis"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Val-de-Marne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Val-d'Oise"));

            regions.add(new Region("Languedoc-Roussillon"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Aude"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Gard"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Hérault"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Lozère"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Pyrénées-Orientales"));

            regions.add(new Region("Limousin"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Corrèze"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Creuse"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Haute-Vienne"));

            regions.add(new Region("Lorraine"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Meurthe-et-Moselle"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Meuse"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Moselle"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Vosges"));

            regions.add(new Region("Midi-Pyrénées"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Ariège"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Aveyron"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Haute-Garonne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Gers"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Lot"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Hautes-Pyrénées"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Tarn"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Tarn-et-Garonne"));

            regions.add(new Region("Nord-Pas-de-Calais"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Nord"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Pas-de-Calais"));

            regions.add(new Region("Pays de la Loire"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Loire-Atlantique"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Maine-et-Loire"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Mayenne"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Sarthe"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Vendée"));

            regions.add(new Region("Picardie"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Laon"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Beauvais"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Amiens"));

            regions.add(new Region("Poitou-Charentes"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Charente"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Charente-Maritime"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Deux-Sèvres"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Vienne"));

            regions.add(new Region("PACA"));

            departements.add(new Departement(regions.get(regions.size() - 1), "Alpes-de-Haute-Provence"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Hautes-Alpes"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Alpes-Maritimes"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Bouches-du-Rhone"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Var"));
            departements.add(new Departement(regions.get(regions.size() - 1), "Vaucluse"));
           
            for(Region region : regions) {
                regionDao.save(region);
            }
           
View Full Code Here

        ArrayList<Region> regions = new ArrayList<Region>();
        ArrayList<Departement> departements = new ArrayList<Departement>();
       
        regions.add(new Region("Alsace"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Bas-Rhin"));
        departements.add(new Departement(regions.get(regions.size()-1),"Haut-Rhin"));
       
        regions.add(new Region("Aquitaine"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Dordogne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Gironde"));
        departements.add(new Departement(regions.get(regions.size()-1),"Landes"));
        departements.add(new Departement(regions.get(regions.size()-1),"Lot-et-Garonne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Pyrénées-Atlantiques"));
       
        regions.add(new Region("Auvergne"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Allier"));
        departements.add(new Departement(regions.get(regions.size()-1),"Cantal"));
        departements.add(new Departement(regions.get(regions.size()-1),"Haute-Loire"));
        departements.add(new Departement(regions.get(regions.size()-1),"Puy-de-Dôme"));
       
        regions.add(new Region("Basse-Normandie"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Calvados"));
        departements.add(new Departement(regions.get(regions.size()-1),"Manche"));
        departements.add(new Departement(regions.get(regions.size()-1),"Orne"));
       
        regions.add(new Region("Bourgogne"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Côte-d'Or"));
        departements.add(new Departement(regions.get(regions.size()-1),"Nièvre"));
        departements.add(new Departement(regions.get(regions.size()-1),"Saône-et-Loire"));
        departements.add(new Departement(regions.get(regions.size()-1),"Yonne"));
       
        regions.add(new Region("Bretagne"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Côtes-d'Armor"));
        departements.add(new Departement(regions.get(regions.size()-1),"Finistère"));
        departements.add(new Departement(regions.get(regions.size()-1),"Ile-et-Vilaine"));
        departements.add(new Departement(regions.get(regions.size()-1),"Morbihan"));
       
        regions.add(new Region("Centre"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Cher"));
        departements.add(new Departement(regions.get(regions.size()-1),"Eure-et-Loir"));
        departements.add(new Departement(regions.get(regions.size()-1),"Indre"));
        departements.add(new Departement(regions.get(regions.size()-1),"Indre-et-Loir"));
        departements.add(new Departement(regions.get(regions.size()-1),"Loir-et-Cher"));
        departements.add(new Departement(regions.get(regions.size()-1),"Loiret"));
       
        regions.add(new Region("Champagne-Ardenne"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Ardennes"));
        departements.add(new Departement(regions.get(regions.size()-1),"Aube"));
        departements.add(new Departement(regions.get(regions.size()-1),"Marne"));
        departements.add(new Departement(regions.get(regions.size()-1),"haute-Marne"));
       
        regions.add(new Region("Corse"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Haute-Corse"));
        departements.add(new Departement(regions.get(regions.size()-1),"Basse-corse"));
       
        regions.add(new Region("Franche-Comté"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Doubs"));
        departements.add(new Departement(regions.get(regions.size()-1),"Jura"));
        departements.add(new Departement(regions.get(regions.size()-1),"Haute-Saône"));
        departements.add(new Departement(regions.get(regions.size()-1),"Territoire de Belfort"));
       
        regions.add(new Region("Haute-Normandie"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Seine-Maritime"));
        departements.add(new Departement(regions.get(regions.size()-1),"Eure"));       
       
        regions.add(new Region("Île-de-France"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Paris"));
        departements.add(new Departement(regions.get(regions.size()-1),"Seine-et-Marne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Yvelines"));
        departements.add(new Departement(regions.get(regions.size()-1),"Essone"));
        departements.add(new Departement(regions.get(regions.size()-1),"Hauts-de-Seine"));
        departements.add(new Departement(regions.get(regions.size()-1),"Seine-Saint-Denis"));
        departements.add(new Departement(regions.get(regions.size()-1),"Val-de-Marne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Val-d'Oise"));
       
        regions.add(new Region("Languedoc-Roussillon"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Aude"));
        departements.add(new Departement(regions.get(regions.size()-1),"Gard"));
        departements.add(new Departement(regions.get(regions.size()-1),"Hérault"));
        departements.add(new Departement(regions.get(regions.size()-1),"Lozère"));
        departements.add(new Departement(regions.get(regions.size()-1),"Pyrénées-Orientales"));
       
        regions.add(new Region("Limousin"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Corrèze"));
        departements.add(new Departement(regions.get(regions.size()-1),"Creuse"));
        departements.add(new Departement(regions.get(regions.size()-1),"Haute-Vienne"));
       
        regions.add(new Region("Lorraine"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Meurthe-et-Moselle"));
        departements.add(new Departement(regions.get(regions.size()-1),"Meuse"));
        departements.add(new Departement(regions.get(regions.size()-1),"Moselle"));
        departements.add(new Departement(regions.get(regions.size()-1),"Vosges"));
       
        regions.add(new Region("Midi-Pyrénées"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Ariège"));
        departements.add(new Departement(regions.get(regions.size()-1),"Aveyron"));
        departements.add(new Departement(regions.get(regions.size()-1),"Haute-Garonne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Gers"));
        departements.add(new Departement(regions.get(regions.size()-1),"Lot"));
        departements.add(new Departement(regions.get(regions.size()-1),"Hautes-Pyrénées"));
        departements.add(new Departement(regions.get(regions.size()-1),"Tarn"));
        departements.add(new Departement(regions.get(regions.size()-1),"Tarn-et-Garonne"));
       
        regions.add(new Region("Nord-Pas-de-Calais"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Nord"));
        departements.add(new Departement(regions.get(regions.size()-1),"Pas-de-Calais"));
       
        regions.add(new Region("Pays de la Loire"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Loire-Atlantique"));
        departements.add(new Departement(regions.get(regions.size()-1),"Maine-et-Loire"));
        departements.add(new Departement(regions.get(regions.size()-1),"Mayenne"));
        departements.add(new Departement(regions.get(regions.size()-1),"Sarthe"));
        departements.add(new Departement(regions.get(regions.size()-1),"Vendée"));
       
        regions.add(new Region("Picardie"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Laon"));
        departements.add(new Departement(regions.get(regions.size()-1),"Beauvais"));
        departements.add(new Departement(regions.get(regions.size()-1),"Amiens"));
       
        regions.add(new Region("Poitou-Charentes"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Charente"));
        departements.add(new Departement(regions.get(regions.size()-1),"Charente-Maritime"));
        departements.add(new Departement(regions.get(regions.size()-1),"Deux-Sèvres"));
        departements.add(new Departement(regions.get(regions.size()-1),"Vienne"));
       
        regions.add(new Region("PACA"));
       
        departements.add(new Departement(regions.get(regions.size()-1),"Alpes-de-Haute-Provence"));
        departements.add(new Departement(regions.get(regions.size()-1),"Hautes-Alpes"));
        departements.add(new Departement(regions.get(regions.size()-1),"Alpes-Maritimes"));
        departements.add(new Departement(regions.get(regions.size()-1),"Bouches-du-Rhone"));
        departements.add(new Departement(regions.get(regions.size()-1),"Var"));
        departements.add(new Departement(regions.get(regions.size()-1),"Vaucluse"));

       
        for(Region r : regions){
            session.save(r);
           
View Full Code Here

        HttpSession session = request.getSession();
        AnnonceDao annoncesDao = new AnnonceDao();
        DepartementDao departementDao = new DepartementDao();
        CategorieDao categorieDao = new CategorieDao();
       
        Departement departement = departementDao.getById(chercherForm.getDepartement());
        Categorie categorie = categorieDao.getById(chercherForm.getCategorie());
       
        session.setAttribute("annonces", annoncesDao.getAnnonces(
                chercherForm.getPrixMin(),
                chercherForm.getPrixMax(),
View Full Code Here

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
       
        HttpSession session = request.getSession();

        Membre m = (Membre) session.getAttribute("membre");


        MessageDao dao = new MessageDao();

        Set<Message> messages = dao.getSentMessageByIdMembre(m);
View Full Code Here

      throws Exception {
                   
            //cast to ValidatorForm 
            LoginForm loginForm = (LoginForm) form;

            Membre m = new Membre();
            m.setIdentifiant(loginForm.getLogin());
            m.setMotDePasse(loginForm.getPassword());

            MembreDao dao = new MembreDao();
            try{
                Membre membre = dao.isRegister(m);
                if(membre != null){
                    HttpSession session = request.getSession();

                    MessageDao mDao = new MessageDao();
                    //Plante, mais je sais pas pkoi.
View Full Code Here

TOP

Related Classes of fr.utbm.in56.annonces.dao.DepartementDao

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.