Merging filter complete GUI for Airport, Airline and Route Raw Data

This commit is contained in:
Sunguin Peng
2016-09-17 18:22:31 +12:00
10 changed files with 409 additions and 88 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ public class Route {
}
//JavaDoc needed
public int getAirlineID() throws DataException {
if (this.airline != null) {
if (this.getAirline() != null) {
return this.getAirline().getID();
}else {
return 0;
@@ -241,7 +241,7 @@ public class Route {
*/
public void hasDuplicate(Route route) throws DataException{
//routeAirline + routeSourceAirport + routeArrvAirport + routeCodeShare + routeStops + routeEquip
if (route.getAirline().equals(this.airline) && route.getDepartureAirport().equals(this.departureAirport)
if (route.getAirlineName().equals(this.airlineName) && route.getDepartureAirport().equals(this.departureAirport)
&& route.getArrivalAirport().equals(this.arrivalAirport) && route.getCode().equals(this.codeShare)
&& route.getStops() == this.stops && route.getEquipment().equals(this.equipment)){
throw new DataException("This Route already exists.");