Class TravelDocumentFX

java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocumentFX

public class TravelDocumentFX extends Object
TravelDocumentFX is a class made to display content in a TableView JavaFX object.
  • Field Details

    • travelDocumentID

      private String travelDocumentID
    • price

      private double price
    • issueDate

      private LocalDate issueDate
    • expirationDate

      private LocalDate expirationDate
    • transactionID

      private String transactionID
    • lineID

      private String lineID
    • rideID

      private String rideID
    • stampDate

      private LocalDate stampDate
    • startDate

      private LocalDate startDate
  • Constructor Details

    • TravelDocumentFX

      public TravelDocumentFX(String travelDocumentID, double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate)
      TravelDocumentFX constructor
      Parameters:
      travelDocumentID - The unique identifier of the travel document
      price - The price of the travel document
      issueDate - The issue date of the travel document
      expirationDate - The date of expire of the travel document
      transactionID - The unique identifier of the transaction which contains travel documents bought by the citizen
      lineID - The unique identifier of the line if the travel document is a single ticket
      rideID - The unique identifier of the ride if the travel document is a single ticket
      stampDate - The stamp date of the travel document, in particular a single ticket
      startDate - The validity start date of the travel document if it is a membership
    • TravelDocumentFX

      public TravelDocumentFX(TravelDocument travelDocument)
      TravelDocumentFX constructor Builds a TravelDocumentFX object according to the TravelDocument object
      Parameters:
      travelDocument - A reference to a generic TravelDocument object
    • TravelDocumentFX

      public TravelDocumentFX(SingleTicket travelDocument)
      TravelDocumentFX constructor Builds a TravelDocumentFX object according to a SingleTicket object
      Parameters:
      travelDocument - A reference to a SingleTicket object
    • TravelDocumentFX

      public TravelDocumentFX(Membership travelDocument)
      TravelDocumentFX constructor Builds a TravelDocumentFX object according to a Membership object
      Parameters:
      travelDocument - A reference to a Membership object
  • Method Details

    • setTravelDocumentID

      protected void setTravelDocumentID(String travelDocumentID)
    • setPrice

      protected void setPrice(double price)
    • setIssueDate

      protected void setIssueDate(LocalDate issueDate)
    • setExpirationDate

      protected void setExpirationDate(LocalDate expirationDate)
    • setTransactionID

      protected void setTransactionID(String transactionID)
    • setLineID

      protected void setLineID(String lineID)
    • setRideID

      protected void setRideID(String rideID)
    • setStampDate

      protected void setStampDate(LocalDate stampDate)
    • setStartDate

      protected void setStartDate(LocalDate startDate)
    • getTravelDocumentID

      public String getTravelDocumentID()
    • getPrice

      public double getPrice()
    • getIssueDate

      public LocalDate getIssueDate()
    • getExpirationDate

      public LocalDate getExpirationDate()
    • getTransactionID

      public String getTransactionID()
    • getLineID

      public String getLineID()
    • getRideID

      public String getRideID()
    • getStampDate

      public LocalDate getStampDate()
    • getStartDate

      public LocalDate getStartDate()
    • toTravelDocument

      public TravelDocument toTravelDocument()
      Produces a TravelDocument object according to the TravelDocumentFX object calling this method
      Returns:
      A reference to a TravelDocument object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object