org.deltava.beans.schedule
Class PartnerAirline

java.lang.Object
  extended by org.deltava.beans.schedule.PartnerAirline

public class PartnerAirline
extends Object

A bean to store codeshare flight number data.

Since:
1.0
Version:
3.0
Author:
Luke

Field Summary
static PartnerAirline IGNORE
          Special entry to ignore/discard imported schedule data.
 
Constructor Summary
PartnerAirline(Airline a, int startFlight, int endFlight)
          Populates the bean for alll import filenames.
PartnerAirline(Airline a, int startFlight, int endFlight, String fileName)
          Populates the bean.
 
Method Summary
 boolean contains(int flightNumber)
          Returns whether a flight number maps to this Airline.
 boolean equals(Object o2)
          Compares two Partner Airlines by comparing the airline codes.
 Airline getAirline()
          Returns the Airline bean.
 int hashCode()
           
 boolean includesFile(String fileName)
          Returns whether this Partner Airline data applies to a particular import file.
 void setFileName(String fName)
          Sets the import file name associated with this partner airline mapping.
 String toString()
          Returns the airline code, flight range and file name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IGNORE

public static final PartnerAirline IGNORE
Special entry to ignore/discard imported schedule data.

Constructor Detail

PartnerAirline

public PartnerAirline(Airline a,
                      int startFlight,
                      int endFlight,
                      String fileName)
Populates the bean.

Parameters:
a - the Airline bean
startFlight - the first flight number served by this Airline
endFlight - the first flight number served by this Airline
fileName - the import file name to apply this partner airline mapping to

PartnerAirline

PartnerAirline(Airline a,
               int startFlight,
               int endFlight)
Populates the bean for alll import filenames.

Parameters:
a - the Airline bean
startFlight - the first flight number served by this Airline
endFlight - the first flight number served by this Airline
Method Detail

contains

public boolean contains(int flightNumber)
Returns whether a flight number maps to this Airline.

Parameters:
flightNumber - the flight number
Returns:
TRUE if the Airline serves this flight, otherwise FALSE

getAirline

public Airline getAirline()
Returns the Airline bean.

Returns:
the Airline

includesFile

public boolean includesFile(String fileName)
Returns whether this Partner Airline data applies to a particular import file.

Parameters:
fileName - the import file name
Returns:
TRUE if this data applies to the import file, otherwise FALSE

setFileName

public void setFileName(String fName)
Sets the import file name associated with this partner airline mapping.

Parameters:
fName - the file name, or null/* if applicable to all

equals

public boolean equals(Object o2)
Compares two Partner Airlines by comparing the airline codes.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns the airline code, flight range and file name.

Overrides:
toString in class Object


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