Class TourProgress

java.lang.Object
org.deltava.beans.stats.TourProgress
All Implemented Interfaces:
Serializable, Comparable<TourProgress>, IDBean

public class TourProgress extends Object implements Serializable, IDBean, Comparable<TourProgress>
A bean to track Pilot progress within a Flight Tour.
Since:
10.2
Version:
10.5
Author:
Luke
See Also:
  • Constructor Details

    • TourProgress

      public TourProgress(int pilotID, int tourID, int legs)
      Creates the bean.
      Parameters:
      pilotID - the Pilot database ID
      tourID - the Flight Tour database ID
      legs - the number of Flight Legs completed in this Tour
  • Method Details

    • getID

      public int getID()
      Returns the Pilot's database ID.
      Specified by:
      getID in interface IDBean
      Returns:
      the datbase ID
    • getHexID

      public String getHexID()
      Description copied from interface: IDBean
      Returns the hexadecimal database ID of this object.
      Specified by:
      getHexID in interface IDBean
      Returns:
      the hexadecimal formatted database ID, or an empty string if zero
    • getTourID

      public int getTourID()
      Returns the Tour's database ID.
      Returns:
      the datbase ID
    • getLegs

      public int getLegs()
      Returns the number of legs completed.
      Returns:
      the number of legs
    • getFirstLeg

      public Instant getFirstLeg()
      Returns the flight date of the first leg in this Tour.
      Returns:
      the flight date
    • getLastLeg

      public Instant getLastLeg()
      Returns the flight date of the most recent leg in this Tour.
      Returns:
      the flight date
    • getProgressTime

      public Duration getProgressTime()
      Returns the amount of time the Tour has been in progress by a Pilot.
      Returns:
      the Duration
    • setFirstLeg

      public void setFirstLeg(Instant dt)
      Updates the flight date of the first leg in this Tour.
      Parameters:
      dt - the flight date
    • setLastLeg

      public void setLastLeg(Instant dt)
      Updates the flight date of the most recent leg in this Tour.
      Parameters:
      dt - the flight date
    • compareTo

      public int compareTo(TourProgress tp2)
      Specified by:
      compareTo in interface Comparable<TourProgress>