Package at.fhj.itm.model

Examples of at.fhj.itm.model.Waypoint


        "qweiurioewhu");

    User v = new User(-1, "Klara", "Klaustaler", "KK", "12345",
        "k.k@local.at", "004312345678", b, new Date(), "nsvjdna");

    Waypoint ab = new Waypoint(a, b, u, "", true);
    Waypoint ba = new Waypoint(b, a, u, "", true);
    Waypoint bc = new Waypoint(b, c, v, "", true);
    Waypoint ac = new Waypoint(a, c, v, "", true);
    Waypoint cd = new Waypoint(c, d, v, "", true);

    Trip trip0 = new Trip(v, new Date(), 5, ab, "");
    Trip trip1 = new Trip(v, new Date(), 4, bc, "");
    Trip trip2 = new Trip(v, new Date(), 4, ac, "");
    Trip trip3 = new Trip(v, new Date(), 5, cd, "");
View Full Code Here


      if (stops.length > 0) {

        stopovers = new ArrayList<Waypoint>();
        for (Location l : stops) {

          stopovers.add(new Waypoint(fromLocation, l, user, null,
              true));

          stopovers
              .add(new Waypoint(l, toLocation, user, null, true));
        }
      }
      Waypoint waypoint = new Waypoint(fromLocation, toLocation, user,
          null, true);
      newTrip = new Trip(user, departure, seats, waypoint, "");

      // insert the trip to DAO
      getTripDAO().update(newTrip, getConnection());
View Full Code Here

    Location fromLocation = this.locationDAO.getByID(from_location,connection);
    Location toLocation = this.locationDAO.getByID(to_location, connection);
    User user = this.userDAO.getByID(user_id, connection);

    return new Waypoint(id, fromLocation, toLocation, user, comment, active);
  }
View Full Code Here

      List<Waypoint> waypoints = new ArrayList<Waypoint>();
      PreparedStatement selectAllStmt = connection
          .prepareStatement(GET_ALL_WAYPOINTS);
      ResultSet set = selectAllStmt.executeQuery();
      while (set.next()) {
        Waypoint wp = getFromResultSet(set, connection);
        waypoints.add(wp);

      }
      set.close();
      selectAllStmt.close();
View Full Code Here

      PreparedStatement selectByIdStmt = connection
          .prepareStatement(GET_WAYPOINTS_BY_ID);
      selectByIdStmt.setInt(1, id);
      ResultSet set = selectByIdStmt.executeQuery();
      set.next();
      Waypoint wp = getFromResultSet(set, connection);
      set.close();
      selectByIdStmt.close();
     
      return wp;
    } catch (SQLException e) {
View Full Code Here

TOP

Related Classes of at.fhj.itm.model.Waypoint

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.