Package Interface

Examples of Interface.TableDAOInterface


      String duree = request.getParameter(" DUREE").toString();
      String code_utilise = request.getParameter(" CODE_UTILISE").toString();
      String date_souscription = request.getParameter(" DATE_SOUSCRIPTION").toString();
      String requete = "update ABONNEMENT set NUM_ABONNEMENT=" + num_abonnement + " , LOGIN='" + login + "' , DUREE=" + duree + " , CODE_UTILISE='"+ code_utilise + "' , DATE_SOUSCRIPTION='" + date_souscription + "'";
      requete = requete + " where NUM_ABONNEMENT=" + num_abonnementOLD;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("JEUX")){
      String num_jeu = request.getParameter("NUM_JEUX").toString();
      String num_jeuOLD = request.getParameter("NUM_JEUXOLD").toString();
      String categorie = request.getParameter(" CATEGORIE").toString();
      String nom = request.getParameter(" NOM").toString();
      String type = request.getParameter(" TYPE").toString();
      String description = request.getParameter(" DESCRIPTION").toString();
      String contexte = request.getParameter(" CONTEXTE").toString();
      String regle = request.getParameter(" REGLE").toString();
      String controls = request.getParameter(" CONTROLS").toString();
      String numberofplay = request.getParameter(" NUMBEROFPLAY").toString();
      String numberofrates = request.getParameter(" NUMBEROFRATES").toString();
      String rates = request.getParameter(" RATES").toString();
      String jeuxdumois = request.getParameter(" JEUX_DU_MOIS").toString();
      String requete = "update JEUX set NUM_JEUX=" + num_jeu + " , CATEGORIE='" + categorie + "' , NOM='" + nom + "' , TYPE='"+ type + "' , DESCRIPTION='" + description + "' , CONTEXTE='" + contexte + "' , REGLE='" + regle + "' , CONTROLS='"+ controls + "' , NUMBEROFPLAY=" + numberofplay + " , NUMBEROFRATES=" + numberofrates + " , RATES="+ rates + " , JEUX_DU_MOIS=" + jeuxdumois;
      requete = requete + " where NUM_JEUX=" + num_jeuOLD;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      System.out.println(requete);
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("NOTER")){
      String login = request.getParameter("LOGIN").toString();
      String loginOLD = request.getParameter("LOGINOLD").toString();
      String numjeux = request.getParameter(" NUM_JEUX").toString();
      String numjeuxOLD = request.getParameter(" NUM_JEUXOLD").toString();
      String note = request.getParameter(" NOTE").toString();
      String requete = "update NOTER set LOGIN='" + login + "' , NUM_JEUX=" + numjeux + " , NOTE=" + note;
      requete = requete + " where LOGIN='" + loginOLD + "' AND NUM_JEUX=" + numjeuxOLD;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("PAGE")){
      String url = request.getParameter("URL").toString();
      String urlOLD = request.getParameter("URLOLD").toString();
      String titre = request.getParameter(" TITRE").toString();
      String header = request.getParameter(" HEADER").toString();
      String footer = request.getParameter(" FOOTER").toString();
      String requete = "update PAGE set URL='" + url + "' , TITRE='" + titre + "' , HEADER='" + header + "' , FOOTER='"+ footer + "'";
      requete = requete + " where URL='" + urlOLD + "'";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("SITE")){
      String idsite = request.getParameter("ID_SITE").toString();
      String idsiteOLD = request.getParameter("ID_SITEOLD").toString();
      String titre = request.getParameter(" TITRE").toString();
      String description = request.getParameter(" DESCRIPTION").toString();
      String requete = "update SITE set ID_SITE=" + idsite + " , TITRE='" + titre + "' , DESCRIPTION='" + description + "'";
      requete = requete + " where ID_SITE=" + idsiteOLD;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("UTILISATEUR")){
      String login = request.getParameter("LOGIN").toString();
      String loginOLD = request.getParameter("LOGINOLD").toString();
      String mdp = request.getParameter(" MDP").toString();
      String datefinabo = request.getParameter(" DATE_FIN_ABONNEMENT").toString();
      String comptevalider = request.getParameter(" COMPTE_VALIDER").toString();
      String email = request.getParameter(" EMAIL").toString();
      String newsletter = request.getParameter(" NEWS_LETTER").toString();
      String admin = request.getParameter(" ADMINISTRATEUR").toString();
      String requete = "update UTILISATEUR set LOGIN='" + login + "' , MDP='" + mdp + "' , DATE_FIN_ABONNEMENT='" + datefinabo + "' , COMPTE_VALIDER="+ comptevalider + " , EMAIL='" + email + "' , NEWS_LETTER="+ newsletter + " , ADMINISTRATEUR=" + admin;
      requete = requete + " where LOGIN='" + loginOLD + "'";
      System.out.println(requete);
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
      return;
    }else if(tableName.equals("QUESTION_REPONSE")){
      String num_qr = request.getParameter("NUM_QR").toString();
      String num_qrOLD = request.getParameter("NUM_QROLD").toString();
      String id_site = request.getParameter(" ID_SITE").toString();
      String id_siteOLD = request.getParameter(" ID_SITEOLD").toString();
      String text = request.getParameter(" TEXT").toString();
   
      String requete = "update QUESTION_REPONSE set TEXT=\"" + text + "\" , NUM_QR=" + num_qr + " , ID_SITE=" + id_site+"";
      requete = requete + " where NUM_QR=" + num_qrOLD + "";
      System.out.println(requete);
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
      return;
    }
  }
View Full Code Here


    String tableName = request.getParameter("table").toString();
    tableName=tableName.toUpperCase();
    if(tableName.equals("ABONNEMENT")){
      String num_abonnementOLD = request.getParameter("NUM_ABONNEMENT").toString();
      String requete = "delete from ABONNEMENT where NUM_ABONNEMENT=" + num_abonnementOLD;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("JEUX")){
      String num_jeuOLD = request.getParameter("NUM_JEUX").toString();
      String requete = "delete from JEUX where NUM_JEUX=" + num_jeuOLD;
      System.out.println(requete);
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("NOTER")){
      String login = request.getParameter("LOGIN").toString();
      String numjeux = request.getParameter(" NUM_JEUX").toString();
      String requete = "delete from NOTER where LOGIN='" + login + "' AND NUM_JEUX=" + numjeux;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("PAGE")){
      String url = request.getParameter("URL").toString();
      String requete = "delete from PAGE where URL='" + url + "'";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("SITE")){
      String idsite = request.getParameter("ID_SITE").toString();
      String requete = "delete from SITE where ID_SITE=" + idsite;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
      return;
    }else if(tableName.equals("UTILISATEUR")){
      String login = request.getParameter("LOGIN").toString();
      String requete = "delete from UTILISATEUR where LOGIN='" + login + "'";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
      return;
    }else if(tableName.equals("QUESTION_REPONSE")){
      String num_qr = request.getParameter("NUM_QR").toString();
      String requete = "delete from QUESTION_REPONSE where NUM_QR="+num_qr;
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
      return;
    }
   
View Full Code Here

      String duree = request.getParameter(" DUREE").toString();
      String code_utilise = request.getParameter(" CODE_UTILISE").toString();
      String date_souscription = request.getParameter(" DATE_SOUSCRIPTION").toString();
      String requete = "insert into ABONNEMENT(NUM_ABONNEMENT,LOGIN,DUREE,CODE_UTILISE,DATE_SOUSCRIPTION)";
      requete = requete + "values ("+ num_abonnement +",'"+ login +"','"+ duree +"','"+ code_utilise +"','"+ date_souscription +"')";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
    }else if(tableName.equals("JEUX")){
      String num_jeu = request.getParameter("NUM_JEUX").toString();
      String categorie = request.getParameter(" CATEGORIE").toString();
      String nom = request.getParameter(" NOM").toString();
      String type = request.getParameter(" TYPE").toString();
      String description = request.getParameter(" DESCRIPTION").toString();
      String contexte = request.getParameter(" CONTEXTE").toString();
      String regle = request.getParameter(" REGLE").toString();
      String controls = request.getParameter(" CONTROLS").toString();
      String numberofplay = request.getParameter(" NUMBEROFPLAY").toString();
      String numberofrates = request.getParameter(" NUMBEROFRATES").toString();
      String rates = request.getParameter(" RATES").toString();
      String jeuxdumois = request.getParameter(" JEUX_DU_MOIS").toString();
      String requete = "insert into JEUX(NUM_JEUX,CATEGORIE,NOM,TYPE,DESCRIPTION,CONTEXTE,REGLE,CONTROLS,NUMBEROFPLAY,NUMBEROFRATES,RATES,JEUX_DU_MOIS)";
      requete = requete + "values ("+ num_jeu +",'"+ categorie +"','"+ nom +"','"+ type +"','"+ description +"','"+ contexte +"','"+ regle +"','"+ controls +"',"+ numberofplay +","+ numberofrates +","+ rates +","+ jeuxdumois +")";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
    }else if(tableName.equals("NOTER")){
      String login = request.getParameter("LOGIN").toString();
      String numjeux = request.getParameter(" NUM_JEUX").toString();
      String note = request.getParameter(" NOTE").toString();
      String requete = "insert into NOTER(LOGIN,NUM_JEUX,NOTE)";
      requete = requete + "values ('"+ login +"',"+ numjeux +","+ note +")";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
    }else if(tableName.equals("PAGE")){
      String url = request.getParameter("URL").toString();
      String titre = request.getParameter(" TITRE").toString();
      String header = request.getParameter(" HEADER").toString();
      String footer = request.getParameter(" FOOTER").toString();
      String requete = "insert into PAGE(URL,TITRE,HEADER,FOOTER)";
      requete = requete + "values ('"+ url +"','"+ titre +"','"+ header +"','"+ footer +"')";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
    }else if(tableName.equals("SITE")){
      String idsite = request.getParameter("ID_SITE").toString();
      String titre = request.getParameter(" TITRE").toString();
      String description = request.getParameter(" DESCRIPTION").toString();
      String requete = "insert into SITE(ID_SITE,TITRE,DESCRIPTION)";
      requete = requete + "values ("+ idsite +",'"+ titre +"','"+ description +"')";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response);
    }else if(tableName.equals("UTILISATEUR")){
      String login = request.getParameter("LOGIN").toString();
      String mdp = request.getParameter(" MDP").toString();
      String datefinabo = request.getParameter(" DATE_FIN_ABONNEMENT").toString();
      String comptevalider = request.getParameter(" COMPTE_VALIDER").toString();
      String email = request.getParameter(" EMAIL").toString();
      String newsletter = request.getParameter(" NEWS_LETTER").toString();
      String admin = request.getParameter(" ADMINISTRATEUR").toString();
      String requete = "insert into UTILISATEUR(LOGIN,MDP,DATE_FIN_ABONNEMENT,COMPTE_VALIDER,EMAIL,NEWS_LETTER,ADMINISTRATEUR)";
      requete = requete + "values ('"+ login +"','"+ mdp +"','"+ datefinabo +"',"+ comptevalider +",'"+ email +"',"+ newsletter +","+ admin +")";
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
    }else if(tableName.equals("QUESTION_REPONSE")){
      String num_qr = request.getParameter("NUM_QR").toString();
      String id_site = request.getParameter(" ID_SITE").toString();
      String text = request.getParameter(" TEXT").toString();

      String requete = "insert into QUESTION_REPONSE(TEXT,NUM_QR,ID_SITE) values (TEXT=\"" + text + "\", NUM_QR=" + num_qr + ", ID_SITE=" + id_site+")";
      System.out.println(requete);
      TableDAOInterface tableDAO = new JDBCTableDAO();
      tableDAO.faireRequete(requete);
      tableDAO.loadDatas();
      updateSite();
      request.getRequestDispatcher("administration.jsp").forward(request, response)
      return;
    }
  }
View Full Code Here

TOP

Related Classes of Interface.TableDAOInterface

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.