// -----------------------------------------------------BOK ----------------------------------------------------------
// BOK-T-N total pax of booking
case "BOKTN": // if travel class equals null, the counting will be miss up
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if (p.getBookedClass() != null && !isCrew( p) && "T".equals(ufisClassType) ){
result++;
}else if (p.getBookedClass() != null
&& !isCrew( p) && toUfisClass(p).equals(ufisClassType)){
result++;
}
}
break;
// BOK-M-N toal male pax of booking
case "BOKMN": // if not child and no infant indicator, it will be count as adult
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBookedClass() != null
&& isMale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBookedClass() != null
&& isMale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// BOK-F-N toal female pax of booking
case "BOKFN": // if not child and no infant indicator, it will be count as adult
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBookedClass() != null
&& isFemale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBookedClass() != null
&& isFemale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// BOK-A-N toal adult pax of booking
case "BOKAN": // if not child and no infant indicator, it will be count as adult
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBookedClass() != null
&& isAdult(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBookedClass() != null
&& isAdult(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// BOK-C-N toal child pax of booking
case "BOKCN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBookedClass() != null
&& isChild(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBookedClass() != null
&& isChild(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// BOK-I-N toal infant pax of booking
case "BOKIN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBookedClass() != null
&& isInfant(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBookedClass() != null
&& isInfant(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// ---------------------------------------------------------- CIN ---------------------------------------------------------------------
// CIN-T-N total pax of check-in
case "CINTN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getCheckInDateTime() != null
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getCheckInDateTime() != null
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// CIN-A-N male pax of check-in
case "CINMN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if( p.getCheckInDateTime() != null
&& isMale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getCheckInDateTime() != null
&& isMale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// CIN-A-N female pax of check-in
case "CINFN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if( p.getCheckInDateTime() != null
&& isFemale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getCheckInDateTime() != null
&& isFemale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// CIN-A-N adult pax of check-in
case "CINAN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if( p.getCheckInDateTime() != null
&& isAdult(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getCheckInDateTime() != null
&& isAdult(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// CIN-C-N child pax of check-in
case "CINCN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getCheckInDateTime() != null
&& isChild(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getCheckInDateTime() != null
&& isChild(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// CIN-I-N child pax of check-in
case "CININ":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getCheckInDateTime() != null
&& isInfant(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getCheckInDateTime() != null
&& isInfant(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// ----------------------------------------------------------PBO ----------------------------------------------------------------------
// PBO-T-N total pax of boarding
case "PBOTN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// PBO-A-N male pax of boarding
case "PBOMN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isMale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isMale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// PBO-A-N adult pax of boarding
case "PBOFN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isFemale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isFemale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// PBO-A-N adult pax of boarding
case "PBOAN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isAdult(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isAdult(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// PBO-C-N child pax of boarding
case "PBOCN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&&p.getBoardingStatus().trim().equals("Y")
&& isChild(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if (p.getBoardingStatus() != null
&&p.getBoardingStatus().trim().equals("Y")
&& isChild(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// PBO-I-N infant pax of boarding
case "PBOIN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isInfant(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if(p.getBoardingStatus() != null
&& p.getBoardingStatus().trim().equals("Y")
&& isInfant(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// // ----------------------------------------------------------BAG -----------------------------------------------------------------------
// // BAG-T
// case "bagt":
// // do calculation
// while(it.hasNext()){
// EntDbLoadPax p =(EntDbLoadPax)it.next();
// if(p.getBagNoOfPieces() != null
// && toUfisClass(p).equals(ufisClassType)
// && !isCrew( p)){
// result += p.getBagNoOfPieces().intValue();
// }
// }
// break;
// // ------------------------------------------------------------BWT ---------------------------------------------------------------------
// // BWT-T
// case "bwtt":
// // do calculation
// while(it.hasNext()){
// EntDbLoadPax p =(EntDbLoadPax)it.next();
// if(p.getBagWeight() != null
// && toUfisClass(p).equals(ufisClassType)
// && !isCrew( p)){
// result += p.getBagWeight().intValue();
// }
// }
// break;
// ----------------------------------------------------------JOI ----------------------------------------------------------------------
// JOI -T-N total pax of join
case "JOITN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// JOI-A-N adult pax of join
case "JOIMN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isMale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isMale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// JOI-A-N adult pax of join
case "JOIFN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isFemale(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isFemale(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// JOI-A-N adult pax of join
case "JOIAN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isAdult(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isAdult(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// JOI-C-N child pax of join
case "JOICN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isChild(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if ((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isChild(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// JOI-I-N child pax of join
case "JOIIN":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isInfant(p)
&& "T".equals(ufisClassType)
&& !isCrew( p)){
result++;
}else if ((p.getEntDbPaxConns() == null || p.getEntDbPaxConns().size() == 0)
&& isInfant(p)
&& toUfisClass(p).equals(ufisClassType)
&& !isCrew( p)){
result++;
}
}
break;
// -------------------------------------------------------------------TXF ---------------------------------------------------------------------
// TXFTN total pax of transfer
case "TXFTN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
// if(toUfisClass(p.getPax()).equals(ufisClassType)
if("T".equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
//TXF-M-N male pax of transfer
case "TXFMN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
if(isMale(p.getPax())
&& "T".equals(ufisClassType)
&& !isCrew(p.getPax())){
result++;
}else if (isMale(p.getPax())
&& toUfisClass(p.getPax()).equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
//TXF-F-N male pax of transfer
case "TXFFN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
if(isFemale(p.getPax())
&& "T".equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}else if (isFemale(p.getPax())
&& toUfisClass(p.getPax()).equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
//TXFAN adult pax of transfer
case "TXFAN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
if(isAdult(p.getPax())
&& "T".equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}else if (isAdult(p.getPax())
&& toUfisClass(p.getPax()).equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
//TXFCN child pax of transfer
case "TXFCN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
if( isChild(p.getPax())
&& toUfisClass(p.getPax()).equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
//TXFIN infant pax of transfer
case "TXFIN":
// do calculation
while(it.hasNext()){
EntDbLoadPaxConn p =(EntDbLoadPaxConn)it.next();
if(isInfant(p.getPax())
&& "T".equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}else if (isInfant(p.getPax())
&& toUfisClass(p.getPax()).equals(ufisClassType)
&& !isCrew( p.getPax())){
result++;
}
}
break;
// -------------------------------------------------------------------CBN ---------------------------------------------------------------------
//
case "CBN-N-T":
// do calculation
while(it.hasNext()){
EntDbLoadPax p =(EntDbLoadPax)it.next();
if(isCrew( p) && "T".equals(ufisClassType)){
result++;
}else if(isCrew( p) && toUfisClass(p).equals(ufisClassType)){
result++;
}