Package upc.iluminados.excepcion

Examples of upc.iluminados.excepcion.BaseExcepcion


 
   private AlquilerCanchaDAO alquilerCanchaDAO = new AlquilerCanchaDAO();

    public void insertar(AlquilerCancha vo) throws BaseExcepcion {
          if (StringUtils.isEmpty(vo.getFecha())) {
              throw new BaseExcepcion("Fecha Requerido");
          }
         
          if (StringUtils.isEmpty(vo.getHoraFin())) {
              throw new BaseExcepcion("Hora Fin Requerido");
          }
         
         
          if (StringUtils.isEmpty(vo.getHoraInicio())) {
              throw new BaseExcepcion("Hora Inicio Requerido");
          }
 
          AlquilerCancha cancha = alquilerCanchaDAO.obtener(vo.getHorarioCancha().getId(), vo.getFecha());
          if (cancha != null) {
              throw new BaseExcepcion("Cancha ya se encuentra alquilada en ese horario");
          }
 
          alquilerCanchaDAO.insertar(vo);
    }
View Full Code Here

TOP

Related Classes of upc.iluminados.excepcion.BaseExcepcion

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.