flightInfo.setArrivalDate(flightConnectionInfo.getArrivalDate());
// Arrival Time
flightInfo.setArrivalTime(flightConnectionInfo.getArrivalTime());
bookFlightResponse.setFlightInfo(flightInfo);
ConnectionInfoTable connectionInfoTable = new ConnectionInfoTable();
List<ConnectionInfo> rows = new ArrayList<ConnectionInfo>();
for (FlightHop flightHop: flightConnectionInfo.getFlightHopList()) {
// Connection Info
ConnectionInfo connection = new ConnectionInfo();
// Connection ID
connection.setConnectionId(flightHop.getHopNumber());
// Airline
connection.setAirline(flightHop.getAirlineName());
// Plane Type
connection.setPlaneType(flightHop.getAircraftType());
// Departure City
connection.setCityFrom(flightHop.getDepatureCity());
// Departure Date
connection.setDepartureDate(flightHop.getDepatureDate());
// Departure Time
connection.setDepartureTime(flightHop.getDepatureTime());
// Arrival City
connection.setCityTo(flightHop.getArrivalCity());
// Arrival Date
connection.setArrivalDate(flightHop.getArrivalDate());
// Arrival Time
connection.setArrivalTime(flightHop.getArrivalTime());
rows.add(connection);
}
connectionInfoTable.setRows(rows);
bookFlightResponse.setConnectionInfo(connectionInfoTable);
response.setContent(bookFlightResponse);
return response;
}