Class DraftFlightReport
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.Flight
org.deltava.beans.flight.FlightReport
org.deltava.beans.flight.DraftFlightReport
- All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, CalendarEntry, FlightData, FlightNumber, IDBean, FlightTimes, RoutePair, ViewEntry, Cacheable
A class to store draft Flight Report data, with scheduled departure/arrival times.
- Since:
- 2.8
- Version:
- 11.5
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface RoutePair
RoutePair.RoutePairImplModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Field Summary
Fields inherited from class FlightReport
ATTR_WARN_MASK -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Flight Report object with a given Flight.DraftFlightReport(Airline a, int flightNumber, int leg) Creates a new Flight Report object with a given flight. -
Method Summary
Modifier and TypeMethodDescriptionReturns the planned altitude.Returns default comments with departure and arrival times.A method to return the exact length of the flight.getGateA()Returns the arrival Gate name.getGateD()Returns the departure Gate name.getTimeA()Returns the scheduled arrival time in local time.getTimeD()Returns the scheduled departure time in local time.booleanhasGates()Returns whether the flight has departure and arrival gates assigned.voidsetAltitude(String alt) Updates the planned altitude.voidUpdates the arrival Gate name.voidUpdates the departure Gate name.voidUpdates the scheduled arrival time in local time.voidUpdates the scheduled departure time in local time.Methods inherited from class FlightReport
addStatusUpdate, addStatusUpdate, compareTo, getAttributes, getAuthorID, getCaptEQType, getComments, getDatabaseID, getDate, getDisposedOn, getFDR, getLength, getLoadFactor, getNetwork, getPassengers, getRank, getRemarks, getRoute, getRowClassName, getSimulator, getStatus, getStatusUpdates, getSubmittedOn, getYear, hasAttribute, hasDatabaseID, setAttribute, setAttributes, setAuthorID, setCaptEQType, setCaptEQType, setComments, setDatabaseID, setDate, setDisposedOn, setID, setLeg, setLength, setLoadFactor, setNetwork, setPassengers, setRank, setRemarks, setRoute, setSimulator, setStatus, setSubmittedOnModifier and TypeMethodDescriptionvoidaddStatusUpdate(int authorID, HistoryType type, String msg) Creates a new status update and adds it to the Flight Report.voidAdds a status update to this Flight Report.intintReturns the attributes for this Flight Report.intReturns the Author of this bean.Returns if this flight counts towards promotion in a particular equipment type program.Returns the disposition comments for this Flight Report.intgetDatabaseID(DatabaseID idType) Sets the database row ID of a relatied database row.getDate()Returns the date of the flight.The date/time this Flight Report was disposed on.getFDR()Returns the Flight Data recorder used for this flight.intReturns the length of the fllight in hours multiplied by ten.doubleReturns the load factor for this flight.Returns the OnlineNetwork the flight is operated on.intReturns the number of passengers carried on this flight.getRank()Returns the Pilot's rank at the time of the Flight.Returns the remarks for this Flight Report.getRoute()Returns the filed Flight Route.Returns the CSS class for this object if rendered in a view table.Returns the Simulator used for this flight.Returns the status of this Flight Report.Returns the flight status history.The date/time this Flight Report was submitted for approval.intgetYear()Returns the year the Flight Report was flown.booleanReturns the presence of a particular flight Attribute.booleanhasDatabaseID(DatabaseID idType) Returns whether this Flight has a related database row ID.voidsetAttribute(Attribute a, boolean isSet) Set/Clear a particular Attribute for this Flight Report.voidsetAttributes(int attrs) Sets the attributes for this Flight Report.voidsetAuthorID(int id) Updates the author of this bean.voidsetCaptEQType(String eqType) Sets if this Flight counts towards promotion in a particular equipment program.voidsetCaptEQType(Collection<String> eqTypes) Sets if this Flight counts towards promotion in a particular equipment program.voidsetComments(String comments) Sets the disposition comments for this Flight Report.voidsetDatabaseID(DatabaseID idType, int id) Sets the database row ID of a relatied database row.voidUpdates the date that this Flight was flown on.voidsetDisposedOn(Instant dd) Updates the date/time this Flight Report was approved or rejected on.voidsetID(int id) Updates the database ID, and the database ID of any associated status updates.final voidsetLeg(int leg) Sets the Flight Leg.voidsetLength(int length) Sets the length of this Flight, in hours multiplied by 10.voidsetLoadFactor(double lf) Updates the load factor for this flight.voidsetNetwork(OnlineNetwork network) Updates the Online Network used on this Flight.voidsetPassengers(int ps) Updates the number of passengers carried on this flight.voidUpdates the rank of the Pilot filing this report.voidsetRemarks(String remarks) Sets the remarks for this Flight Report.voidUpdates the filed Flight Route.voidsetSimulator(Simulator sim) Updates the Simulator used for this flight.voidsetStatus(FlightStatus status) Sets the status of this Flight Report.voidUpdates the date/time this Flight Report was submitted on.Methods inherited from class Flight
equals, getAirline, getAirportA, getAirportD, getCallsign, getDistance, getEquipmentType, getFlightCode, getFlightNumber, getLeg, getLegCode, getShortCode, hashCode, setAirline, setAirportA, setAirportD, setEquipmentType, setFlightNumber, toStringModifier and TypeMethodDescriptionbooleanReturns the Airline.Returns the arrival Airport.Returns the departure Airport.Returns the flight code as a callsign, using the Airline ICAO code.intReturns the distance between the Airports.Returns the Equipment type for this flightReturns a text representation of the Flight in the format "CODE### Leg #".intReturns the Flight Number.intgetLeg()Returns the Flight Leg.Returns an abbreviated version of the Flight code with a dash instead of text.Returns the Flight code without the leg.inthashCode()voidSet the Airline for this flight.voidSets the Arrival Airport object for this flight.voidSets the Departure Airport object for this flight.voidsetEquipmentType(String eqType) Sets the equipment type for this flight.voidsetFlightNumber(int fNumber) Set the Flight Number for this flighttoString()Methods inherited from class DatabaseBean
cacheKey, getHexID, getID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.getHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.Methods inherited from interface FlightData
getEquipmentTypeMethods inherited from interface FlightTimes
hasFlightTimesModifier and TypeMethodDescriptiondefault booleanReturns if both the departure and arrrival date/times have been populated.Methods inherited from interface RoutePair
createKey, getAirports, getFlightType, includes, isPopulated, matches, midPointModifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the airports in this Route Pair.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether both airports are populated.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.
-
Constructor Details
-
DraftFlightReport
Creates a new Flight Report object with a given Flight.- Parameters:
f- the Flight bean
-
DraftFlightReport
Creates a new Flight Report object with a given flight.- Parameters:
a- the AirlineflightNumber- the Flight Numberleg- the Leg Number- Throws:
NullPointerException- if the Airline Code is nullIllegalArgumentException- if the Flight Report is zero or negativeIllegalArgumentException- if the Leg is less than 1 or greater than 5
-
-
Method Details
-
getTimeD
Returns the scheduled departure time in local time. The date portion should be ignored.- Specified by:
getTimeDin interfaceFlightTimes- Returns:
- the departure date/time
- See Also:
-
getTimeA
Returns the scheduled arrival time in local time. The date portion should be ignored.- Specified by:
getTimeAin interfaceFlightTimes- Returns:
- the arrival date/time
- See Also:
-
getAltitude
-
getGateD
-
getGateA
-
hasGates
public boolean hasGates()Returns whether the flight has departure and arrival gates assigned.- Returns:
- TRUE if departure and arrival gates are assigned, otherwise FALSE
-
setTimeD
Updates the scheduled departure time in local time. The date portion should be ignored.- Parameters:
dt- the departure date/time
-
setTimeA
Updates the scheduled arrival time in local time. The date portion should be ignored.- Parameters:
dt- the arrival date/time
-
setGateD
Updates the departure Gate name.- Parameters:
name- the Gate name or null if not defined
-
setGateA
Updates the arrival Gate name.- Parameters:
name- the Gate name or null if not defined
-
setAltitude
-
getDraftComments
Returns default comments with departure and arrival times.- Returns:
- the comments
-
getDuration
Description copied from class:FlightA method to return the exact length of the flight.- Overrides:
getDurationin classFlightReport- Returns:
- a Duration
-