All Packages Class Hierarchy This Package Previous Next Index
Class JBMSTours.serializabletypes.TransferFlight
java.lang.Object
|
+----JBMSTours.serializabletypes.Flight
|
+----JBMSTours.serializabletypes.OneStopFlight
|
+----JBMSTours.serializabletypes.TransferFlight
- public class TransferFlight
- extends OneStopFlight
- implements Serializable
Look at the Source.
Definition of a flight with one transfer.
-
segment2ID
-
-
TransferFlight()
- Default niladic constructor for a flight with one transfer.
-
TransferFlight(Flight, Flight)
- Constructs a TransferFlight flight from its two legs.
-
checkSegmentAvailability(Connection, Date, short, int)
- Checks whether the flight is available on the specified date
for the specified number of seats.
-
getAltFlightId()
- Get the flight id of the second leg.
-
getType()
- Get the flight type.
-
getUniqueId()
-
-
storeBookingInfoForAirline(Connection, int, Date, int, BigDecimal, short)
- "Books" the flight by extracting the pertinent information to
a separate table (FlightBookings).
-
toString()
- Prints out this object.
segment2ID
public String segment2ID
TransferFlight
public TransferFlight()
- Default niladic constructor for a flight with one transfer.
TransferFlight
public TransferFlight(Flight segone,
Flight segtwo)
- Constructs a TransferFlight flight from its two legs.
- Parameters:
- segone - Flight object for first flight.
- segtwo - Flight object for second flight.
toString
public String toString()
- Prints out this object.
- Overrides:
- toString in class OneStopFlight
getAltFlightId
public String getAltFlightId()
- Get the flight id of the second leg.
- Returns:
- flight id of the second leg.
- Overrides:
- getAltFlightId in class OneStopFlight
getType
public String getType()
- Get the flight type.
- Returns:
- flight type.
- Overrides:
- getType in class OneStopFlight
getUniqueId
public String getUniqueId()
- Overrides:
- getUniqueId in class OneStopFlight
storeBookingInfoForAirline
public int storeBookingInfoForAirline(Connection conn,
int gid,
Date travelDate,
int numberSeats,
BigDecimal fixedRate,
short level) throws SQLException
- "Books" the flight by extracting the pertinent information to
a separate table (FlightBookings). This is the information
that eventually goes to the airline.
- Parameters:
- conn - Connection
- gid - The group_id
- travelDate - Date that travel begins.
- numberSeats - number of seats reserved
- fixedRate - the rate for those seats
- The - level of the tour. See the static variables in Tour.java.
- Returns:
- > 0 if FlightBookings table successfully updated.
- Throws: SQLException
- in case anything goes wrong during a SQL operation
- Overrides:
- storeBookingInfoForAirline in class OneStopFlight
checkSegmentAvailability
public boolean checkSegmentAvailability(Connection conn,
Date travel,
short kindOfSeats,
int numberOfSeatsNeeded) throws SQLException
- Checks whether the flight is available on the specified date
for the specified number of seats.
Called by CustomerFlight.checkAvailability().
- Parameters:
- conn - Connection
- travel - The date flying.
- kindOfSeats - the name of the column in FlightAvailability to select from
- numberSeats - number of seats needed
- Returns:
- true, if the flight is available
- Throws: SQLException
- in case anything goes wrong during a SQL operation
- Overrides:
- checkSegmentAvailability in class OneStopFlight
All Packages Class Hierarchy This Package Previous Next Index