Package interfaces.exceptions

Examples of interfaces.exceptions.MetierException


          try{         
            HttpSession session = req.getSession(false);
            if(session != null){
              Client client = (Client)session.getAttribute("client");
              if(client == null){
                throw new MetierException();
              }
              System.out.println("Adresse : "+adresse);
              // On modifie l'adresse du client
              client.setAdresse(adresse);
              mc.modifierAdresse(client);
View Full Code Here


        fc.setConnection(GestionConnection.getInstance().getConnection());
      }
      // Mise a jour de la base de donnees:
     
    }catch(SQLException se){
      throw new MetierException(MetierException.CONNEXION_IMPOSSIBLE);
    }
  }
View Full Code Here

      MetierException {

      try {
        fc.creerClient(client);
      } catch (SQLException e) {
        throw new MetierException(MetierException.CONNEXION_IMPOSSIBLE);
      } catch (FactoriesException e) {
        // l'erreur recue veut dire qu'un client de tel identifiant existe deja.
        throw new MetierException(e.getMessage());
      }

    return client;
  }
View Full Code Here

  public void modifierAdresse(Client clt) throws RemoteException,
      MetierException {
    try {
      this.fc.updateAdresse(clt);
    } catch (SQLException e) {
      throw new MetierException(MetierException.CONNEXION_IMPOSSIBLE);
    } catch (FactoriesException e) {
      /* l'erreur vient du fait que le client n'existe pas dans la base
       * de donnees
       */
      throw new MetierException(e.getMessage());
    }
  }
View Full Code Here

  public Client rechercherClient(String idClient) throws RemoteException,
      MetierException {
    try {
      return this.fc.rechercherClient(idClient);
    } catch (SQLException e) {
      throw new MetierException(MetierException.CONNEXION_IMPOSSIBLE);
    } catch (FactoriesException e) {
      // client n'existe pas.
      throw new MetierException(e.getMessage());
    }
  }
View Full Code Here

          try{
            // Confirmation de la commande
            req.setAttribute(Message.ACTION_VALIDATION, Message.AFF_CONFIRMATION);
            Commande c = (Commande)session.getAttribute("commande");
            if(c== null){
              throw new MetierException(Message.ERREUR_CONFIRMATION);
            }
            mcom.ajouterCommande(c);
           
            req.setAttribute(Message.TITRE_MESSAGE,Message.TITRE_CMD);
            req.setAttribute(Message.MESSAGE, Message.CMD);
View Full Code Here

      try{     
        HttpSession session = req.getSession(false);
        if (session != null) {
          Client client = (Client) session.getAttribute("client");
          if (client == null) {
            throw new MetierException();
          }
         
          // On modifie l'adresse du client       
          ArrayList<Commande> lesCommandes = mc.rechercherCommandesClient(client.getId());
          HashMap<String,Commande> mapCmds = new HashMap<String,Commande>();
View Full Code Here

          try{
            // Confirmation de la commande
            req.setAttribute(Message.ACTION_VALIDATION, Message.AFF_CONFIRMATION);
            Commande c = (Commande)session.getAttribute("commande");
            if(c== null){
              throw new MetierException(Message.ERREUR_CONFIRMATION);
            }
            mcom.ajouterCommande(c);
           
            req.setAttribute(Message.TITRE_MESSAGE,Message.TITRE_CMD);
            req.setAttribute(Message.MESSAGE, Message.CMD);
View Full Code Here

      try{     
        HttpSession session = req.getSession(false);
        if (session != null) {
          Client client = (Client) session.getAttribute("client");
          if (client == null) {
            throw new MetierException();
          }
         
          // On modifie l'adresse du client       
          ArrayList<Commande> lesCommandes = mc.rechercherCommandesClient(client.getId());
          HashMap<String,Commande> mapCmds = new HashMap<String,Commande>();
View Full Code Here

          try{         
            HttpSession session = req.getSession(false);
            if(session != null){
              Client client = (Client)session.getAttribute("client");
              if(client == null){
                throw new MetierException();
              }
              System.out.println("Adresse : "+adresse);
              // On modifie l'adresse du client
              client.setAdresse(adresse);
              mc.modifierAdresse(client);
View Full Code Here

TOP

Related Classes of interfaces.exceptions.MetierException

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.