java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocument
- Direct Known Subclasses:
Membership
,SingleTicket
TravelDocument is an abstract class that represents a generic travel document
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTravelDocument
(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID) TravelDocument constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
getPrice()
int
hashCode()
protected void
setExpirationDate
(LocalDate expirationDate) protected void
setIssueDate
(LocalDate issueDate) protected void
setPrice
(double price) protected void
setTransactionID
(String transactionID) protected void
setTravelDocumentID
(String travelDocumentID) toString()
Produces a TravelDocumentFX object according to the TravelDocument object calling this methodabstract void
updateTravelDocument
(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Updates TravelDocument object according to new parameters
-
Field Details
-
travelDocumentID
-
price
private double price -
issueDate
-
expirationDate
-
transactionID
-
-
Constructor Details
-
TravelDocument
public TravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID) TravelDocument constructor- Parameters:
price
- The price of the travel documentissueDate
- The issue date of the travel documentexpirationDate
- The date of expire of the travel documenttransactionID
- The unique identifier of the transaction which contains travel documents bought by the citizen
-
-
Method Details
-
setPrice
protected void setPrice(double price) -
setIssueDate
-
setExpirationDate
-
setTravelDocumentID
-
setTransactionID
-
getTravelDocumentID
-
getPrice
public double getPrice() -
getIssueDate
-
getExpirationDate
-
getTransactionID
-
equals
-
hashCode
public int hashCode() -
toString
-
toTravelDocumentFX
Produces a TravelDocumentFX object according to the TravelDocument object calling this method- Returns:
- A reference to a TravelDocumentFX object
-
updateTravelDocument
public abstract void updateTravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Updates TravelDocument object according to new parameters- Parameters:
price
- The price of the travel documentissueDate
- The issue date of the travel documentexpirationDate
- The date of expire of the travel documenttransactionID
- The unique identifier of the transaction which contains travel documents bought by the citizenlineID
- The unique identifier of the line if the travel document is a single ticketrideID
- The unique identifier of the ride if the travel document is a single ticketstampDate
- The stamp date of the travel document, in particular a single ticketstartDate
- The validity start date of the travel document if it is a membership
-