Class Tour
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.DatabaseBlobBean
org.deltava.beans.DatabaseDocumentBean
org.deltava.beans.stats.Tour
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Object>,Auditable,ComboAlias,FeedbackBean,IDBean,ViewEntry,Cacheable
public class Tour
extends DatabaseDocumentBean
implements Auditable, ComboAlias, ViewEntry, FeedbackBean
A bean to store Flight Tour data.
- Since:
- 10.0
- Version:
- 11.6
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.beans.DatabaseBlobBean
_buffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFeedback(Feedback tf) Adds a feedback element to the bean.voidAdds a Flight leg to this Tour.voidaddNetwork(OnlineNetwork net) Adds a valid Online Network to this Tour.voidAdds a Pilot's Tour progress ID to this Tour.voidClears the list of Flights.voidClears the list of Online Networks.booleanReturns whether ACARS flights are required for this Tour.booleanReturns whether the Tour is active.booleanReturns whether offline flights are permitted for this Tour.Returns the object ID for this auditable object.Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.Returns the IDs of the Pilots that have completed this Tour.Returns the Tour end date.Returns the feedback for this bean.intReturns the number of Flight legs in this Tour.Returns the ordered list of Flights for this Tour.intReturns the leg number for a given Flight.booleanReturns whether the equipment used for a flight must match the equipment in the Tour definition.booleanReturns whether the flight number and leg used for a flight must match the flight and leg in the Tour definition.getName()Returns the Tour name.Returns the Online Networks eligibile for use in this Tour.getOwner()Returns the Virtual Airline that owns this Tour.Returns the IDs of Pilots that have completed at least one Flight in this Tour.Returns the CSS class for this object if rendered in a view table.Returns the Tour start date.Returns the status of the Tour.booleanisActiveOn(Instant dt) Returns wether the Tour is active and in effect on a given date.booleanReturns whether this object is within multiple web applications.booleanlegMatches(FlightData f, Flight leg) Checks whether a Flight matches a particular Tour leg.voidsetACARSOnly(boolean acarsOnly) Updates whether ACARS flights are required for this Tour.voidsetActive(boolean isActive) Updates whether the Tour is active.voidsetAllowOffline(boolean allowOffline) Updates whether offline flights are permitted for this Tour.voidsetEndDate(Instant dt) Updates the End date for this Tour.voidsetFlightCount(int cnt) Updates the number of Flight legs in this Tour.voidsetMatchEquipment(boolean matchEQ) Updates whether the equipment used for a flight must match the equipment in the Tour definition.voidsetMatchLeg(boolean matchLeg) Returns whether the flight number and leg used for a flight must match the flight and leg in the Tour definition.voidUpdates the Tour name.voidUpdates the Virtual Airline that owns this Tour.voidsetStartDate(Instant dt) Updates the Start date for this Tour.voidsetStatus(TourStatus st) Updates the status of the Tour.toString()Methods inherited from class org.deltava.beans.DatabaseDocumentBean
getBuffer, getContentType, getExtension, getIsPDF, getSize, getText, load, setForcePDF, setForceSizeMethods inherited from class org.deltava.beans.DatabaseBlobBean
clear, getInputStream, isLoaded, load, loadMethods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.Auditable
getAuditTypeMethods inherited from interface org.deltava.beans.FeedbackBean
hasFeedback
-
Constructor Details
-
Tour
-
-
Method Details
-
getName
-
getActive
public boolean getActive()Returns whether the Tour is active.- Returns:
- TRUE if active, otherwise FALSE
-
getStatus
-
getACARSOnly
public boolean getACARSOnly()Returns whether ACARS flights are required for this Tour.- Returns:
- TRUE if ACARS required, otherwise FALSE
-
getAllowOffline
public boolean getAllowOffline()Returns whether offline flights are permitted for this Tour.- Returns:
- TRUE if offline flights are permitted, otherwise FALSE
-
getMatchEquipment
public boolean getMatchEquipment()Returns whether the equipment used for a flight must match the equipment in the Tour definition.- Returns:
- TRUE if equipment type must match, otherwise FALSE
-
getMatchLeg
public boolean getMatchLeg()Returns whether the flight number and leg used for a flight must match the flight and leg in the Tour definition.- Returns:
- TRUE if flight number and leg must match, otherwise FALSE
-
getNetworks
Returns the Online Networks eligibile for use in this Tour.- Returns:
- a Collection of OnlineNetworks
-
getFeedback
Description copied from interface:FeedbackBeanReturns the feedback for this bean.- Specified by:
getFeedbackin interfaceFeedbackBean- Returns:
- a Collection of Feedback beans
-
getStartDate
-
getEndDate
-
getOwner
Returns the Virtual Airline that owns this Tour.- Returns:
- an AirlineInformation
-
isActiveOn
Returns wether the Tour is active and in effect on a given date.- Parameters:
dt- the date/time, or null for now- Returns:
- TRUE if the Tour is active and the date is within the start/end dates
-
getFlights
Returns the ordered list of Flights for this Tour.- Returns:
- a List of ScheduleEntry beans
-
getFlightCount
public int getFlightCount()Returns the number of Flight legs in this Tour.- Returns:
- the number of legs
-
getLegIndex
Returns the leg number for a given Flight.- Parameters:
f- a Flight- Returns:
- the leg number, or zero if not matched
-
getCompletionIDs
Returns the IDs of the Pilots that have completed this Tour.- Returns:
- a Collection of Pilot database IDs
-
getProgress
Returns the IDs of Pilots that have completed at least one Flight in this Tour.- Returns:
- a Collection of TourProgress beans
-
clearFlights
public void clearFlights()Clears the list of Flights. -
clearNetworks
public void clearNetworks()Clears the list of Online Networks. -
isCrossApp
public boolean isCrossApp()Description copied from interface:AuditableReturns whether this object is within multiple web applications. Objects where this is false will need additional data appended to the audit ID to prevent information leakage across applications where the audit IDs are identical between apps.- Specified by:
isCrossAppin interfaceAuditable- Returns:
- TRUE if cross-application, otherwise FALSE
-
setName
-
setStatus
Updates the status of the Tour.- Parameters:
st- the TourStatus
-
setActive
public void setActive(boolean isActive) Updates whether the Tour is active.- Parameters:
isActive- TRUE if acrtive, otherwise FALSE
-
setACARSOnly
public void setACARSOnly(boolean acarsOnly) Updates whether ACARS flights are required for this Tour.- Parameters:
acarsOnly- TRUE if ACARS required, otherwise FALSE
-
setAllowOffline
public void setAllowOffline(boolean allowOffline) Updates whether offline flights are permitted for this Tour.- Parameters:
allowOffline- TRUE if offline flights permitted, otherwise FALSE
-
setMatchEquipment
public void setMatchEquipment(boolean matchEQ) Updates whether the equipment used for a flight must match the equipment in the Tour definition.- Parameters:
matchEQ- TRUE if equipment type must match, otherwise FALSE
-
setMatchLeg
public void setMatchLeg(boolean matchLeg) Returns whether the flight number and leg used for a flight must match the flight and leg in the Tour definition.- Parameters:
matchLeg- TRUE if flight number and leg must match, otherwise FALSE
-
addNetwork
Adds a valid Online Network to this Tour.- Parameters:
net- an OnlineNetwork
-
setStartDate
Updates the Start date for this Tour.- Parameters:
dt- the start date/time- Throws:
NullPointerException- if dt is nullIllegalArgumentException- if the start date is after the end date
-
setEndDate
Updates the End date for this Tour.- Parameters:
dt- the end date/time- Throws:
NullPointerException- if dt is nullIllegalArgumentException- if the end date is before the start date
-
addFlight
Adds a Flight leg to this Tour.- Parameters:
se- a ScheduleEntry
-
setFlightCount
public void setFlightCount(int cnt) Updates the number of Flight legs in this Tour.- Parameters:
cnt- the number of legs- Throws:
IllegalStateException- if flights have already been added to this Tour
-
setOwner
Updates the Virtual Airline that owns this Tour.- Parameters:
ai- an AirlineInformation beans
-
addProgress
Adds a Pilot's Tour progress ID to this Tour.- Parameters:
tp- a TourProgress bean
-
addFeedback
Description copied from interface:FeedbackBeanAdds a feedback element to the bean.- Specified by:
addFeedbackin interfaceFeedbackBean- Parameters:
tf- a Feedback object
-
legMatches
Checks whether a Flight matches a particular Tour leg.- Parameters:
f- the Flight to checkleg- the Tour leg- Returns:
- TRUE if the flight numbers and route pairs match, otherwise FALSE
-
getComboName
Description copied from interface:ComboAliasReturns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboNamein interfaceComboAlias- Returns:
- The visible name for this entry
-
getComboAlias
Description copied from interface:ComboAliasReturns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAliasin interfaceComboAlias- Returns:
- The alias for this entry
-
getAuditID
Description copied from interface:AuditableReturns the object ID for this auditable object.- Specified by:
getAuditIDin interfaceAuditable- Returns:
- the ID
-
toString
-
getRowClassName
Description copied from interface:ViewEntryReturns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Returns:
- the CSS class name, or NULL if none
-