org.deltava.beans.system
Class AirlineInformation

java.lang.Object
  extended by org.deltava.beans.system.AirlineInformation
All Implemented Interfaces:
Comparable<AirlineInformation>, ComboAlias, Cacheable

public class AirlineInformation
extends Object
implements Comparable<AirlineInformation>, ComboAlias, Cacheable

A bean to store information about other virtual airline databases.

Since:
1.0
Version:
1.0
Author:
Luke

Constructor Summary
AirlineInformation(String code, String name)
          Creates a new Airline Information bean.
 
Method Summary
 Object cacheKey()
          Returns the cache key for this object.
 int compareTo(AirlineInformation ai2)
          Compares two Airline Information beans by comparing their codes.
 boolean equals(Object o)
           
 boolean getCanTransfer()
          Returns whether Pilots can be transferred into this Airline.
 String getCode()
          Returns the Airline code.
 String getComboAlias()
          Returns the alias to use in the HTML <OPTION> element.
 String getComboName()
          Returns the visible name to use in the HTML <OPTION> element.
 String getDB()
          Returns the Airline database name.
 String getDomain()
          Returns the Airline domain name.
 String getName()
          Returns the Airline name.
 int hashCode()
          Returns the airline code's hashcode.
 void setCanTransfer(boolean doTransfer)
          Updates whether Pilots can be transferred into this Airline.
 void setDB(String dbName)
          Updates the Airline database name.
 void setDomain(String domain)
          Updates the Airline domain name.
 String toString()
          Returns the airline code.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AirlineInformation

public AirlineInformation(String code,
                          String name)
Creates a new Airline Information bean.

Parameters:
code - the Airline Code
name - the Airline name
Throws:
NullPointerException - if code or name are null
See Also:
getCode(), getName()
Method Detail

getCode

public String getCode()
Returns the Airline code.

Returns:
the airline code

getDomain

public String getDomain()
Returns the Airline domain name.

Returns:
the domain
See Also:
setDomain(String)

getDB

public String getDB()
Returns the Airline database name.

Returns:
the database name
See Also:
setDB(String)

getName

public String getName()
Returns the Airline name.

Returns:
the airline name

getCanTransfer

public boolean getCanTransfer()
Returns whether Pilots can be transferred into this Airline.

Returns:
TRUE if Pilots can be transferred here, otherwise FALSE
See Also:
setCanTransfer(boolean)

setDomain

public void setDomain(String domain)
Updates the Airline domain name. The domain will be converted to lowercase.

Parameters:
domain - the domain name
Throws:
NullPointerException - if domain is null
See Also:
getDomain()

setDB

public void setDB(String dbName)
Updates the Airline database name. The database will be converted to lowercase.

Parameters:
dbName - the database name
Throws:
NullPointerException - if dbName is null
See Also:
getDB()

setCanTransfer

public void setCanTransfer(boolean doTransfer)
Updates whether Pilots can be transferred into this Airline.

Parameters:
doTransfer - TRUE if Pilots can be transferred, otherwise FALSE
See Also:
getCanTransfer()

getComboName

public String getComboName()
Description copied from interface: ComboAlias
Returns the visible name to use in the HTML <OPTION> element.

Specified by:
getComboName in interface ComboAlias
Returns:
The visible name for this entry

getComboAlias

public String getComboAlias()
Description copied from interface: ComboAlias
Returns the alias to use in the HTML <OPTION> element.

Specified by:
getComboAlias in interface ComboAlias
Returns:
The alias for this entry

cacheKey

public Object cacheKey()
Description copied from interface: Cacheable
Returns the cache key for this object. Caches call this method when adding the object.

Specified by:
cacheKey in interface Cacheable
Returns:
the cache key for the object

compareTo

public int compareTo(AirlineInformation ai2)
Compares two Airline Information beans by comparing their codes.

Specified by:
compareTo in interface Comparable<AirlineInformation>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Returns the airline code.

Overrides:
toString in class Object

hashCode

public int hashCode()
Returns the airline code's hashcode.

Overrides:
hashCode in class Object


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.