Package org.deltava.beans.schedule
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a web application to this Airline.void
Adds an alternate airline code to this Airline.cacheKey()
Returns the cache key for this object.int
final boolean
boolean
Returns 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.boolean
Returns 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.boolean
Returns if the schedules should be synchronized.int
hashCode()
void
setActive
(boolean active) Updates the airline's activity flag.void
setApps
(Collection<String> apps) Updates the web applications this Airline is enabled for.void
Updates the Airline's primary code.void
setCodes
(Collection<String> codes) Clears and updates the list of alternate airline codes.void
Updates the color used when displaying this Airline's routes and destinations in a Google Map.void
setHistoric
(boolean isHistoric) Updates whether this is a historic airline.void
Updates the airline's ICAO code.void
Updates the airline name.void
setScheduleSync
(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, wait
Methods 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:ComboAlias
Returns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAlias
in interfaceComboAlias
- Returns:
- The alias for this entry
-
getComboName
Description copied from interface:ComboAlias
Returns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboName
in 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:
compareTo
in interfaceComparable<Airline>
-
equals
-
hashCode
-
toString
-
cacheKey
-
getAuditID
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- Returns:
- the ID
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-