Class FlightInfo

All Implemented Interfaces:
Serializable, Comparable<Object>, ClientVersion, AuthoredBean, CalendarEntry, FlightData, FlightNumber, IDBean, RemoteAddressBean, RoutePair, TimeSpan, ViewEntry, Cacheable

public class FlightInfo extends ACARSLogEntry implements FlightData, TimeSpan, ViewEntry
A bean to store ACARS Flight Information records.
Since:
1.0
Version:
10.5
Author:
Luke
See Also:
  • Constructor Details

    • FlightInfo

      public FlightInfo(int id)
      Creates a new Flight Information record.
      Parameters:
      id - the flight ID
      Throws:
      IllegalArgumentException - if id or conID are zero or negative
  • Method Details

    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      Returns:
      the author's database ID
      See Also:
    • getAirline

      public Airline getAirline()
      Description copied from interface: FlightNumber
      Returns the Airline.
      Specified by:
      getAirline in interface FlightNumber
      Returns:
      the Airline
    • getFlightNumber

      public int getFlightNumber()
      Description copied from interface: FlightNumber
      Returns the Flight Number.
      Specified by:
      getFlightNumber in interface FlightNumber
      Returns:
      the flight number
    • getLeg

      public int getLeg()
      Description copied from interface: FlightNumber
      Returns the Flight Leg.
      Specified by:
      getLeg in interface FlightNumber
      Returns:
      the leg
    • getNetwork

      public OnlineNetwork getNetwork()
      Description copied from interface: FlightData
      Returns the OnlineNetwork the flight is operated on.
      Specified by:
      getNetwork in interface FlightData
      Returns:
      an OnlineNetwork or null if offline
    • getDispatcherID

      public int getDispatcherID()
      Returns the flight's dispatcher ID.
      Returns:
      the database ID of the dispatcher, or zero if none
      See Also:
    • getRouteID

      public int getRouteID()
      Returns the database ID of the Dispatch route used.
      Returns:
      the route database ID
    • getDispatchLogID

      public int getDispatchLogID()
      Returns the database ID of the dispatch log entry.
      Returns:
      the log entry database ID
    • getDate

      public Instant getDate()
      Description copied from interface: FlightData
      Returns the date of the flight.
      Specified by:
      getDate in interface CalendarEntry
      Specified by:
      getDate in interface FlightData
      Returns:
      the date/time
    • getStartTime

      public Instant getStartTime()
      Description copied from class: ACARSLogEntry
      Returns the date/time of this entry.
      Specified by:
      getStartTime in interface TimeSpan
      Specified by:
      getStartTime in class ACARSLogEntry
      Returns:
      the entry date/time
    • getEndTime

      public Instant getEndTime()
      Description copied from interface: TimeSpan
      The end date/time of this span.
      Specified by:
      getEndTime in interface TimeSpan
      Returns:
      the end date/time
    • getDuration

      public Duration getDuration()
      Description copied from interface: TimeSpan
      The duration of this span, or null if both times are not set.
      Specified by:
      getDuration in interface TimeSpan
      Returns:
      a Duration, or null
    • getFlightCode

      public String getFlightCode()
      Returns the flight code for this flight.
      Returns:
      the flight code (eg. DVA123)
      See Also:
    • getEquipmentType

      public String getEquipmentType()
      Description copied from interface: FlightData
      Returns the equipment type used.
      Specified by:
      getEquipmentType in interface FlightData
      Returns:
      the equipment type
    • getAltitude

      public String getAltitude()
      Returns the filed altitude for this flight.
      Returns:
      the altitude in feet or a flight level
      See Also:
    • getAirportA

      public Airport getAirportA()
      Returns the destination Airport for this flight.
      Specified by:
      getAirportA in interface RoutePair
      Returns:
      the destination Airport bean
      See Also:
    • getGateA

      public Gate getGateA()
      Returns the arrival gate for this flight.
      Returns:
      the arrival Gate bean, or null if unknown
      See Also:
    • getRunwayA

      public Runway getRunwayA()
      Returns the arrival Runway for this flight.
      Returns:
      the arrival Runway, or null if unknown
      See Also:
    • getAirportD

      public Airport getAirportD()
      Returns the origin Airport for this flight.
      Specified by:
      getAirportD in interface RoutePair
      Returns:
      the origin Airport bean
      See Also:
    • getGateD

      public Gate getGateD()
      Returns the departure gate for this flight.
      Returns:
      the origin Gate bean, or null if unknown
      See Also:
    • getRunwayD

      public Runway getRunwayD()
      Returns the departure Runway for this flight.
      Returns:
      the departure Runway, or null if unknown
      See Also:
    • getAirportL

      public Airport getAirportL()
      Returns the divert Airport for this flight.
      Returns:
      the alternate Airport bean
      See Also:
    • getSID

      public TerminalRoute getSID()
      Returns the Departure Route for this flight.
      Returns:
      the SID TerminalRoute bean
      See Also:
    • getSTAR

      public TerminalRoute getSTAR()
      Returns the Arrival Route for this flight.
      Returns:
      the STAR TerminalRoute bean
      See Also:
    • getRoute

      public String getRoute()
      Returns the filed route for this flight.
      Returns:
      the route
      See Also:
    • getRemarks

      public String getRemarks()
      Returns the pilot's remarks for this flight.
      Returns:
      the remarks
      See Also:
    • getAutopilotType

      public AutopilotType getAutopilotType()
      Returns the type of Autopilot used in the aircraft.
      Returns:
      an AutopilotType
      See Also:
    • getSimulator

      public Simulator getSimulator()
      Description copied from interface: FlightData
      Returns the Simulator used for this flight.
      Specified by:
      getSimulator in interface FlightData
      Returns:
      a Simulator
    • getSimMajor

      public int getSimMajor()
      Returns the major version number of the Simulator used in this flight.
      Returns:
      the major version, or zero if unknown
    • getSimMinor

      public int getSimMinor()
      Returns the minor version number of the Simulator used in this flight.
      Returns:
      the minor version
    • getPlatform

      public OperatingSystem getPlatform()
      Returns the underlying simulator platform.
      Returns:
      an OperatingSystem
    • getIsSim64Bit

      public boolean getIsSim64Bit()
      Returns whether the simulator platform is 64-bit.
      Returns:
      TRUE if 64-bit, otherwise FALSE
    • getIsACARS64Bit

      public boolean getIsACARS64Bit()
      Returns whether the ACARS client is 64-bit.
      Returns:
      TRUE if 64-bit, otherwise FALSE
    • getOffline

      public boolean getOffline()
      Returns if this flight was flown disconnected from the ACARS server.
      Returns:
      TRUE if the flight was flown offline, otherwise FALSE
      See Also:
    • getIsMP

      public boolean getIsMP()
      Returns if this flight was flown using ACARS multi-player.
      Returns:
      TRUE if multi-player, otherwise FALSE
      See Also:
    • getHasPIREP

      public boolean getHasPIREP()
      Returns if this flight has an associated Flight Report.
      Returns:
      TRUE if a Flight Report was filed, otherwise FALSE
      See Also:
    • getArchived

      public boolean getArchived()
      Returns if this flight's position data is stored in the archive.
      Returns:
      TRUE if the Position data is in the archive, otherwise FALSE
      See Also:
    • getTXCode

      public int getTXCode()
      Returns the transponder code used on this Flight.
      Returns:
      the transponder code
      See Also:
    • getLoadFactor

      public double getLoadFactor()
      Returns the load factor for this flight.
      Returns:
      the load factor, or 0 if not set
      See Also:
    • getPassengers

      public int getPassengers()
      Returns the number of passengers on the flight.
      Returns:
      the number of passengers
      See Also:
    • getSeats

      public int getSeats()
      Returns the number of available seats on this flight.
      Returns:
      the number of seats
      See Also:
    • getLoadType

      public LoadType getLoadType()
      Returns the mechanism used to generate the load factor.
      Returns:
      a LoadType
      See Also:
    • getPositionCount

      public int getPositionCount()
      Returns the number of position records associated with this Flight.
      Returns:
      the number of positions
      See Also:
    • getPosition

      public RouteEntry getPosition()
      Returns the last logged position for this flight.
      Returns:
      the latest PositionEntry, or NULL if no route data
    • getRouteData

      public Collection<RouteEntry> getRouteData()
      Returns the actual route data for this flight.
      Returns:
      a Collection of RouteEntry beans, or null
      See Also:
    • getPlanData

      public Collection<NavigationDataBean> getPlanData()
      Returns the filed route for this flight.
      Returns:
      a Collection of NavigationDataBeans, or null
      See Also:
    • hasRouteData

      public boolean hasRouteData()
      Returns if this bean contains route data.
      Returns:
      TRUE if route data exists within the bean, otherwise FALSE
      See Also:
    • hasPlanData

      public boolean hasPlanData()
      Returns if this bean contains flight plan data.
      Returns:
      TRUE if flight plan data exists within the bean, otherwise FALSE
      See Also:
    • hasRunwayData

      public boolean hasRunwayData()
      Returns if runway data for this flight has been loaded.
      Returns:
      TRUE if runway data exists, otherwise FALSE
      See Also:
    • isScheduleValidated

      public boolean isScheduleValidated()
      Returns if this flight has been validated as being in the schedule.
      Returns:
      TRUE if the route was validated, otherwise FALSE
    • getDispatcher

      public DispatchType getDispatcher()
      Returns the dispatcher type for this Flight.
      Returns:
      a DispatchType
    • getFDR

      public Recorder getFDR()
      Description copied from interface: FlightData
      Returns the Flight Data recorder used for this flight.
      Specified by:
      getFDR in interface FlightData
      Returns:
      a Recorder enum or null if none/unknown
    • setAuthorID

      public void setAuthorID(int id)
      Updates the Pilot ID for the flight.
      Specified by:
      setAuthorID in interface AuthoredBean
      Parameters:
      id - the database ID of the pilot flying this flight
      See Also:
    • setAirline

      public void setAirline(Airline a)
      Updates the Airline for the flight.
      Parameters:
      a - the Airline
    • setFlight

      public void setFlight(int flight)
      Updates the flight number for the flight.
      Parameters:
      flight - the flight number
    • setDispatcherID

      public void setDispatcherID(int id)
      Updates the Disaptcher ID for the flight.
      Parameters:
      id - the database ID of the dispatcher, or zero if none
      See Also:
    • setRouteID

      public void setRouteID(int id)
      Updates the Dispatch Route ID used in this flight.
      Parameters:
      id - the database ID of the route, or zero if none
      See Also:
    • setDispatchLogID

      public void setDispatchLogID(int id)
      Updates the Dispatch Log ID used in this flight.
      Parameters:
      id - the database ID of the dispatch data, or zero if none
      See Also:
    • setOffline

      public void setOffline(boolean offline)
      Updates whether this flight was flown disconnected from the ACARS server.
      Parameters:
      offline - TRUE if the flight was flown offline, otherwise FALSE
      See Also:
    • setIsMP

      public void setIsMP(boolean isMP)
      Updates whether this flight was flown using ACARS multi-player.
      Parameters:
      isMP - TRUE if multi-player, otherwise FALSE
      See Also:
    • setHasPIREP

      public void setHasPIREP(boolean hasPIREP)
      Updates whether this flight has an associated Flight Report.
      Parameters:
      hasPIREP - TRUE if a Flight Report was filed, otherwise FALSE
      See Also:
    • setArchived

      public void setArchived(boolean archived)
      Marks this Flight's position data as archived.
      Parameters:
      archived - TRUE if the position data is in the archive, otherwise FALSE
      See Also:
    • setScheduleValidated

      public void setScheduleValidated(boolean isOK)
      Marks this Flight as having a valid flight route.
      Parameters:
      isOK - TRUE if the Flight is valid, otherwise FALSE
    • setDispatcher

      public void setDispatcher(DispatchType dsp)
      Marks this Flight as being planned by a Dispatcher.
      Parameters:
      dsp - the DispatchType
    • setStartTime

      public void setStartTime(Instant dt)
      Updates the start date/time for this flight.
      Parameters:
      dt - the date/time the flight started
      See Also:
    • setEndTime

      public void setEndTime(Instant dt)
      Updates the end date/time for this flight.
      Parameters:
      dt - the date/time the flight ended
      See Also:
    • setAirportA

      public void setAirportA(Airport a)
      Updates the destination Airport for this flight.
      Parameters:
      a - an Airport bean
      See Also:
    • setGateA

      public void setGateA(Gate g)
      Updates the arrival Gate for this flight.
      Parameters:
      g - a Gate bean
      See Also:
    • setRunwayA

      public void setRunwayA(Runway r)
      Updates the arrival Runway for this flight.
      Parameters:
      r - a Runway bean
      See Also:
    • setAirportD

      public void setAirportD(Airport a)
      Updates the origination Airport for this flight.
      Parameters:
      a - an Airport bean
      See Also:
    • setGateD

      public void setGateD(Gate g)
      Updates the departure Gate for this flight.
      Parameters:
      g - a Gate bean
      See Also:
    • setRunwayD

      public void setRunwayD(Runway r)
      Updates the departure Runway for this flight.
      Parameters:
      r - a Runway bean
      See Also:
    • setAirportL

      public void setAirportL(Airport a)
      Updates the alternate Airport for this flight.
      Parameters:
      a - an Airport bean
      See Also:
    • setSID

      public void setSID(TerminalRoute sid)
      Updates the Departure route used on this flight.
      Parameters:
      sid - the SID TerminalRoute bean
      See Also:
    • setSTAR

      public void setSTAR(TerminalRoute star)
      Updates the Arrival Route used on this flight.
      Parameters:
      star - the STAR TerminalRoute bean
      See Also:
    • setAltitude

      public void setAltitude(String alt)
      Updates the filed altitude for this flight.
      Parameters:
      alt - the altitude in feet or as a flight level
      See Also:
    • setEquipmentType

      public void setEquipmentType(String eq)
      Updates the aircraft used on this flight.
      Parameters:
      eq - the equipment type
      See Also:
    • setLoadFactor

      public void setLoadFactor(double lf)
      Updates the load factor for this flight.
      Parameters:
      lf - the load factor
      See Also:
    • setPassengers

      public void setPassengers(int pax)
      Updates the number of passengers on this flight.
      Parameters:
      pax - the number of passengers
      See Also:
    • setSeats

      public void setSeats(int seats)
      Updates the number of seats on this flight.
      Parameters:
      seats - the number of seats
      See Also:
    • setLoadType

      public void setLoadType(LoadType lt)
      Updates the mechanism used to generate the load factor for this flight.
      Parameters:
      lt - a LoadType
      See Also:
    • setAutopilotType

      public void setAutopilotType(AutopilotType ap)
      Updates the autopilot type used in the aircraft.
      Parameters:
      ap - an AutoPilotType
      See Also:
    • setSimulator

      public void setSimulator(Simulator sim)
      Updates the Simulator used in this flight.
      Parameters:
      sim - the Simulator
      See Also:
    • setSimulatorVersion

      public void setSimulatorVersion(int major, int minor)
      Updates the simulator version used in this flight.
      Parameters:
      major - the major version
      minor - the minor version
    • setPlatform

      public void setPlatform(OperatingSystem os)
      Updates the underlying simulator platform.
      Parameters:
      os - an OperatingSystem
    • setIsSim64Bit

      public void setIsSim64Bit(boolean is64)
      Updates whether the simulator is a 64-bit application.
      Parameters:
      is64 - TRUE if 64-bit, otherwise FALSE
    • setIsACARS64Bit

      public void setIsACARS64Bit(boolean is64)
      Updates whether ACARS is a 64-bit application.
      Parameters:
      is64 - TRUE if 64-bit, otherwise FALSE
    • setFlightCode

      @Deprecated public void setFlightCode(String code)
      Deprecated.
      Updates the flight number for this flight.
      Parameters:
      code - the flight code
      Throws:
      NullPointerException - if code is null
      See Also:
    • setFDR

      public void setFDR(Recorder r)
      Sets the Flight Data Recorder used on this Flight.
      Parameters:
      r - the Recorder
    • setRoute

      public void setRoute(String route)
      Updates the filed route for this flight.
      Parameters:
      route - the filed route
      See Also:
    • setRemarks

      public void setRemarks(String remarks)
      Updates the pilot's remarks for this flight.
      Parameters:
      remarks - the pilot's remarks
      See Also:
    • setTXCode

      public void setTXCode(int tx)
      Updates the transponder code used on this flight.
      Parameters:
      tx - the transponder code
      See Also:
    • setPositionCount

      public void setPositionCount(int posCount)
      Updates the number of position records for this Flight.
      Parameters:
      posCount - the number of records
      See Also:
    • setPosition

      public void setPosition(RouteEntry pos)
      Sets the current position of the flight. This is used to override the progress data.
      Parameters:
      pos - the current position
    • setRouteData

      public void setRouteData(Collection<? extends RouteEntry> entries)
      Updates the actual route data for this flight.
      Parameters:
      entries - a Collection of RouteEntry beans
      See Also:
    • setPlanData

      public void setPlanData(Collection<NavigationDataBean> entries)
      Updates the flight plan data for this flight.
      Parameters:
      entries - a Collection of NavigationDatbBeans
      See Also:
    • getRowClassName

      public String getRowClassName()
      Displays the CSS class name for this table row.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name