Class Airline
java.lang.Object
org.deltava.beans.schedule.Airline
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Airline>,Auditable,ComboAlias,ViewEntry,Cacheable
public class Airline
extends Object
implements ComboAlias, Auditable, Comparable<Airline>, Cacheable, ViewEntry
A class for storing Airline information.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a web application to this Airline.voidAdds an alternate airline code to this Airline.cacheKey()Returns the cache key for this object.intfinal booleanbooleanReturns if the airline is active.Returns the web applications this airline is enabled for.Returns the object ID for this auditable object.getCode()Returns the airline's IATA code.getCodes()Returns all valid airline codes for this Airline.getColor()The color to use then displaying this Airline's destinations or routes in a Google Map.Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.booleanReturns whether this is a historic airline.getICAO()Returns the airline's ICAO code.getName()Returns the airline name.Returns the CSS class for this object if rendered in a view table.booleanReturns if the schedules should be synchronized.inthashCode()voidsetActive(boolean active) Updates the airline's activity flag.voidsetApps(Collection<String> apps) Updates the web applications this Airline is enabled for.voidUpdates the Airline's primary code.voidsetCodes(Collection<String> codes) Clears and updates the list of alternate airline codes.voidUpdates the color used when displaying this Airline's routes and destinations in a Google Map.voidsetHistoric(boolean isHistoric) Updates whether this is a historic airline.voidUpdates the airline's ICAO code.voidUpdates the airline name.voidsetScheduleSync(boolean sync) Updates whether the airline's schedules can be synchronized.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
-
Airline
Create a new Airline using a code and a name.- Parameters:
code- the Airline IATA codename- the Airline name- Throws:
NullPointerException- If either the name or the code are null- See Also:
-
-
Method Details
-
getCode
-
getICAO
-
getApplications
Returns the web applications this airline is enabled for.- Returns:
- a Collection of application codes
- See Also:
-
getCodes
Returns all valid airline codes for this Airline.- Returns:
- a Collection of Airline codes
- See Also:
-
getName
-
getActive
public boolean getActive()Returns if the airline is active.- Returns:
- TRUE if the airline is enabled, otherwise FALSE
- See Also:
-
getHistoric
public boolean getHistoric()Returns whether this is a historic airline.- Returns:
- TRUE if historic, otherwise FALSE
- See Also:
-
getScheduleSync
public boolean getScheduleSync()Returns if the schedules should be synchronized.- Returns:
- TRUE if synchronized, otherwise FALSE
- See Also:
-
getColor
The color to use then displaying this Airline's destinations or routes in a Google Map.- Returns:
- the color name
- See Also:
-
setActive
public void setActive(boolean active) Updates the airline's activity flag.- Parameters:
active- TRUE if the airline is enabled, otherwise FALSE- See Also:
-
setICAO
Updates the airline's ICAO code.- Parameters:
icao- the ICAO code- Throws:
NullPointerException- if code is null- See Also:
-
setHistoric
public void setHistoric(boolean isHistoric) Updates whether this is a historic airline.- Parameters:
isHistoric- TRUE if historic, otherwise FALSE- See Also:
-
setScheduleSync
public void setScheduleSync(boolean sync) Updates whether the airline's schedules can be synchronized.- Parameters:
sync- TRUE if the schedules can be synchronized, otherwise FALSE- See Also:
-
addApp
Adds a web application to this Airline.- Parameters:
app- the application code- See Also:
-
setApps
Updates the web applications this Airline is enabled for.- Parameters:
apps- a Collection of application codes- See Also:
-
addCode
Adds an alternate airline code to this Airline.- Parameters:
code- the airline code- Throws:
NullPointerException- if code is null- See Also:
-
setCode
Updates the Airline's primary code.- Parameters:
code- the airline code- Throws:
NullPointerException- if code is null- See Also:
-
setColor
Updates the color used when displaying this Airline's routes and destinations in a Google Map.- Parameters:
color- the color code- Throws:
IllegalArgumentException- if not a valid Google Map color- See Also:
-
setCodes
Clears and updates the list of alternate airline codes.- Parameters:
codes- a Collection of airline codes- Throws:
NullPointerException- if codes is null- See Also:
-
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
-
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
-
setName
Updates the airline name.- Parameters:
name- the Airline Name- Throws:
NullPointerException- if name is null- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<Airline>
-
equals
-
hashCode
-
toString
-
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
-