Class Aircraft
java.lang.Object
org.deltava.beans.schedule.Aircraft
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Aircraft>,Auditable,ViewEntry,Cacheable
public class Aircraft
extends Object
implements Comparable<Aircraft>, Auditable, Cacheable, ViewEntry
A bean to store Aircraft type information and ACARS fuel profiles. Fuel is loaded in ACARS in the order of primary, secondary
and other tanks, and each Microsoft Flight Simulator fuel tank can be assigned to one of these three tank types.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddApp(AircraftPolicyOptions opts) Marks this aircraft type as used by a particular web application.voidLinks an IATA equipment code to this aircraft.cacheKey()Returns the cache key for this object.intbooleanbooleanReturns whether this aircraft is only used in the Flight Academy.getApps()Returns all web applications using this aircraft type.Returns the object ID for this auditable object.intReturns the aircraft's base fuel load.intReturns the aircraft's cruise speedbyteReturns the number of engines on this aircraft.Returns the aircraft's engine type.Returns the aircraft family name.intReturns the aircraft's fuel flow.Returns the aircraft's full name.booleanReturns whether this aircraft is a Historic type.getIATA()Returns the aircraft's IATA equipment code(s).getICAO()Returns the aircraft's ICAO equipmnet code.intReturns the maximum landing weight of the Aircraft.intReturns the maximum takeoff weight of the Aircraft.intReturns the maximum weight of the Aircraft.intReturns the maximum zero fuel weight of the Aircraft.getName()Returns the aircraft name.getOptions(String appCode) Returns policy options for this Aircraft for a specific virtual airline.intReturns the filling percentage for a particular tank type.Returns the CSS class for this object if rendered in a view table.Returns the fuel tank names, for display in a JSP.Returns the fuel tank fill percentages, for display in a JSP.intReturns the fuel tank codes for a particular tank type.intReturns the aircraft's taxi fuel load.inthashCode()booleanReturns whether a particular web application uses this aircraft type.voidRemoves a web application from this aircraft type.voidsetAcadedmyOnly(boolean isAcademy) Updates whether this aircraft is only used in the Flight Academy.voidsetBaseFuel(int fuelAmt) Updates the aircraft's base fuel load.voidsetCruiseSpeed(int speed) Updates the aircraft's cruise speed.voidsetEngines(byte engines) Updates the number of engines on this aircraft.voidsetEngineType(String engName) Updates the aircraft's engine type.voidUpdates the aircraft family code, using for multi-player fallback rendering.voidsetFuelFlow(int flow) Updates the aircraft's cruise fuel flow.voidsetFullName(String name) Updates the aircraft's full name.voidsetHistoric(boolean isHistoric) Updates whether this aircraft is a Historic type.voidsetIATA(Collection<String> codes) Updates this aircraft's IATA codes.voidUpdates the aircraft's ICAO code.voidsetMaxLandingWeight(int weight) Updates the maximum landing weight of the Aircraft.voidsetMaxTakeoffWeight(int weight) Updates the maximum takeoff weight of the Aircraft.voidsetMaxWeight(int weight) Updates the maximum weight of the Aircraft.voidsetMaxZeroFuelWeight(int weight) Updates the maximum zero fuel weight of the Aircraft.voidUpdates the aircraft name.voidUpdates the tank usage percentage for a particular fuel tank type.voidUpdates the fuel tanks used in filling the aircraft.voidsetTanks(TankType tt, Collection<String> tankNames) Updates the fuel tanks used in filling the aircraft.voidsetTaxiFuel(int fuelAmt) Updates the aircraft's taxi fuel load.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.Auditable
getAuditType, isCrossApp
-
Constructor Details
-
Aircraft
Initializes the bean.- Parameters:
name- the equipment name- Throws:
NullPointerException- if name is null
-
-
Method Details
-
getName
-
getFamily
-
getICAO
Returns the aircraft's ICAO equipmnet code.- Returns:
- the ICAO equipment code
- See Also:
-
getIATA
Returns the aircraft's IATA equipment code(s).- Returns:
- a sorted Collection of IATA codes
- See Also:
-
getHistoric
public boolean getHistoric()Returns whether this aircraft is a Historic type.- Returns:
- TRUE if this is a Historic type, otherwise FALSE
- See Also:
-
getAcademyOnly
public boolean getAcademyOnly()Returns whether this aircraft is only used in the Flight Academy.- Returns:
- TRUE if only used in the Flight Academy, otherwise FALSE
- See Also:
-
getFullName
-
getEngines
public byte getEngines()Returns the number of engines on this aircraft.- Returns:
- the number of engines
- See Also:
-
getEngineType
Returns the aircraft's engine type.- Returns:
- the engine type
- See Also:
-
getCruiseSpeed
public int getCruiseSpeed()Returns the aircraft's cruise speed- Returns:
- the cruise speed in knots
- See Also:
-
getBaseFuel
public int getBaseFuel()Returns the aircraft's base fuel load.- Returns:
- the fuel load in pounds
- See Also:
-
getTaxiFuel
public int getTaxiFuel()Returns the aircraft's taxi fuel load.- Returns:
- the fuel load in pounds
- See Also:
-
getFuelFlow
public int getFuelFlow()Returns the aircraft's fuel flow.- Returns:
- the fuel flow in pounds per engine per hour
- See Also:
-
getApps
Returns all web applications using this aircraft type.- Returns:
- a Collection of AirlineInformation beans
- See Also:
-
getOptions
Returns policy options for this Aircraft for a specific virtual airline.- Parameters:
appCode- the virtual airline code- Returns:
- an AircraftPolicyOptions bean, or null if airline not found
-
isUsed
Returns whether a particular web application uses this aircraft type.- Parameters:
code- the web application airline code- Returns:
- TRUE if the aircraft is used by this web application, otherwise FALSE
- See Also:
-
getTanks
Returns the fuel tank codes for a particular tank type.- Parameters:
tt- the TankType- Returns:
- the tank codes as a bitmap
- Throws:
IllegalArgumentException- if tankType is invalid- See Also:
-
getPct
Returns the filling percentage for a particular tank type.- Parameters:
tt- the TankType- Returns:
- the percentage each tank should be filled
- Throws:
IllegalArgumentException- if tankType is invalid- See Also:
-
getTankNames
Returns the fuel tank names, for display in a JSP.- Returns:
- a Map of Collections of tank names, keyed by tank type
- See Also:
-
getTankPercent
-
getMaxWeight
public int getMaxWeight()Returns the maximum weight of the Aircraft.- Returns:
- the weight in pounds
- See Also:
-
getMaxZeroFuelWeight
public int getMaxZeroFuelWeight()Returns the maximum zero fuel weight of the Aircraft.- Returns:
- the weight in pounds
- See Also:
-
getMaxTakeoffWeight
public int getMaxTakeoffWeight()Returns the maximum takeoff weight of the Aircraft.- Returns:
- the weight in pounds
- See Also:
-
getMaxLandingWeight
public int getMaxLandingWeight()Returns the maximum landing weight of the Aircraft.- Returns:
- the weight in pounds
- See Also:
-
addApp
Marks this aircraft type as used by a particular web application.- Parameters:
opts- the AirlinePolicyOptions bean- See Also:
-
removeApp
Removes a web application from this aircraft type.- Parameters:
appCode- the virtual airline code
-
setName
Updates the aircraft name.- Parameters:
name- the name- Throws:
NullPointerException- if name is null- See Also:
-
setFullName
Updates the aircraft's full name.- Parameters:
name- the full name- Throws:
NullPointerException- if name is null- See Also:
-
setFamily
Updates the aircraft family code, using for multi-player fallback rendering.- Parameters:
family- the family code- Throws:
NullPointerException- if family is null- See Also:
-
setHistoric
public void setHistoric(boolean isHistoric) Updates whether this aircraft is a Historic type.- Parameters:
isHistoric- TRUE if a Historic type, otherwise FALSE- See Also:
-
setAcadedmyOnly
public void setAcadedmyOnly(boolean isAcademy) Updates whether this aircraft is only used in the Flight Academy.- Parameters:
isAcademy- TRUE if Flight Academy only, otherwise FALSE- See Also:
-
setMaxWeight
public void setMaxWeight(int weight) Updates the maximum weight of the Aircraft.- Parameters:
weight- the weight in pounds- See Also:
-
setMaxZeroFuelWeight
public void setMaxZeroFuelWeight(int weight) Updates the maximum zero fuel weight of the Aircraft.- Parameters:
weight- the weight in pounds- See Also:
-
setMaxTakeoffWeight
public void setMaxTakeoffWeight(int weight) Updates the maximum takeoff weight of the Aircraft.- Parameters:
weight- the weight in pounds- See Also:
-
setMaxLandingWeight
public void setMaxLandingWeight(int weight) Updates the maximum landing weight of the Aircraft.- Parameters:
weight- the weight in pounds- See Also:
-
setICAO
-
addIATA
Links an IATA equipment code to this aircraft.- Parameters:
code- the equipment code- Throws:
NullPointerException- if code is null- See Also:
-
setIATA
Updates this aircraft's IATA codes.- Parameters:
codes- a Collection of codes- See Also:
-
setEngines
public void setEngines(byte engines) Updates the number of engines on this aircraft.- Parameters:
engines- the number of engnes- Throws:
IllegalArgumentException- if engines is zero, negative or > 8- See Also:
-
setEngineType
Updates the aircraft's engine type.- Parameters:
engName- the engine type- See Also:
-
setCruiseSpeed
public void setCruiseSpeed(int speed) Updates the aircraft's cruise speed.- Parameters:
speed- the speed in knots- See Also:
-
setBaseFuel
public void setBaseFuel(int fuelAmt) Updates the aircraft's base fuel load.- Parameters:
fuelAmt- the amount of fuel in pounds- See Also:
-
setTaxiFuel
public void setTaxiFuel(int fuelAmt) Updates the aircraft's taxi fuel load.- Parameters:
fuelAmt- the amount of fuel in pounds- See Also:
-
setFuelFlow
public void setFuelFlow(int flow) Updates the aircraft's cruise fuel flow.- Parameters:
flow- the fuel flow in pounds per engine per hour- See Also:
-
setPct
Updates the tank usage percentage for a particular fuel tank type.- Parameters:
tt- the TankTypepct- the percentage required to be filled before filling the next tank type- Throws:
IllegalArgumentException- if tankType is invalid- See Also:
-
setTanks
Updates the fuel tanks used in filling the aircraft.- Parameters:
tt- the TankTypetankCodes- the codes for the fuel tanks used in this order- Throws:
IllegalArgumentException- if tankType is invalid- See Also:
-
setTanks
Updates the fuel tanks used in filling the aircraft.- Parameters:
tt- the TankTypetankNames- a Collection of tank names- Throws:
IllegalArgumentException- if tankType is invalid- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<Aircraft>
-
equals
-
toString
-
hashCode
-
cacheKey
-
getAuditID
Description copied from interface:AuditableReturns the object ID for this auditable object.- Specified by:
getAuditIDin interfaceAuditable- Returns:
- the ID
-
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
-