Package cpe.hapa.model

Examples of cpe.hapa.model.Vol


    String departureTime = request.getParameter("departureTime");
    String arrivalTime = request.getParameter("arrivalTime");
    String price = request.getParameter("price");
    String availableSeats = request.getParameter("availableSeats");
    User connectedUser = null;
    Vol vol = null;
   
    try {
      connectedUser = Authenticate.getConnectedUser(request);
    } catch (NumberFormatException | ParseException e) {
      throw new ServletException(e);
View Full Code Here


  private Vol checkAndInstantiateVolModel(String leavingFrom, String goingTo,
      String departureDate, String arrivalDate,
      String departureTime, String arrivalTime, String price,
      String availableSeats) throws ParseException {
    Vol vol = null;
    if ( leavingFrom != null &&
        goingTo != null &&
        departureDate != null &&
        departureTime != null &&
        arrivalDate != null && 
        arrivalTime != null &&
        price != null &&
        availableSeats != null &&
        !leavingFrom.isEmpty() &&
        !goingTo.isEmpty() &&
        !departureDate.isEmpty() &&
        !departureTime.isEmpty() &&
        !arrivalDate.isEmpty() &&
        !arrivalTime.isEmpty() &&
        !price.isEmpty() &&
        !availableSeats.isEmpty())
    {
      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
      vol = new Vol(
        leavingFrom,
        goingTo,
        sdf.parse(departureDate),
        sdf.parse(arrivalDate),
        departureTime,
View Full Code Here

TOP

Related Classes of cpe.hapa.model.Vol

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.