Package com.ufis_as.ek_if.macs.entities

Examples of com.ufis_as.ek_if.macs.entities.EntDbLoadPax


        // update load_pax
        List<EntDbLoadPax> loadPaxList = _paxbean
            .findByIntFltId(intFlId);
        Iterator<EntDbLoadPax> loadPaxListIt = loadPaxList.iterator();
        while (loadPaxListIt.hasNext()) {
          EntDbLoadPax entDbLoadPax = loadPaxListIt.next();

          if (idFlight != entDbLoadPax.getIdFlight()) {

            EntDbLoadPax oldEntDbLoadPax = (EntDbLoadPax)SerializationUtils.clone(entDbLoadPax);

            entDbLoadPax.setIdFlight(idFlight);
            entDbLoadPax
                .set_updateUser(HpEKConstants.MACS_PAX_DATA_SOURCE);
            entDbLoadPax.set_updatedDate(HpUfisCalendar
View Full Code Here


    startTime = new Date().getTime();  
    // summarize for connection flight
    ArrayList<Integer> connIdFlightBuffer = new ArrayList<Integer>();
    Iterator<EntDbLoadPax> rawPaxListIt = rawPaxList.iterator();
    while(rawPaxListIt.hasNext()){
      EntDbLoadPax loadPax = rawPaxListIt.next();
      if (loadPax.getEntDbPaxConns() != null && loadPax.getEntDbPaxConns().size() > 0){
         List<EntDbLoadPaxConn>  loadPaxConnList = loadPax.getEntDbPaxConns();
         Iterator<EntDbLoadPaxConn> loadPaxConnListIt =loadPaxConnList.iterator();
         while (loadPaxConnListIt.hasNext()){
           EntDbLoadPaxConn loadPaxConn = loadPaxConnListIt.next();
           if (!connIdFlightBuffer.contains(new Integer(loadPaxConn.getIdFlight()))){
             connIdFlightBuffer.add(new Integer(loadPaxConn.getIdFlight()));
View Full Code Here

      // -----------------------------------------------------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();
            ifp.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();
            ifp.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();
            ifp.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++;
            }
View Full Code Here

  protected EntityManager getEntityManager() {
    return em;
  }

  public EntDbLoadPax getPax(String intId) {
    EntDbLoadPax result = null;
    Query query = getEntityManager().createNamedQuery("EntDbLoadPax.findByid");
    query.setParameter("intId", intId);

    List<EntDbLoadPax> list = query.getResultList();
    if (list != null && list.size() > 0) {
View Full Code Here

    }
    return rawPaxList;
  }

  public EntDbLoadPax findByPkId(LoadPaxPK pk) {
    EntDbLoadPax entLoadPax = null;
    try {
      Query query = getEntityManager().createNamedQuery("EntDbLoadPax.findByPk");
      query.setParameter("pKId", pk);

      List<EntDbLoadPax> list = query.getResultList();
View Full Code Here

    return result;
  }*/

  // BELT, OPERA
  public EntDbLoadPax getPaxWithPaxRefNum(String paxRefNum, String urno) {
    EntDbLoadPax result = null;
    List<EntDbLoadPax> resultList = null;         
    Query query = em.createNamedQuery("EntDbLoadPax.findByPaxIdFlight");
    try {
      int idFlight=Integer.parseInt(urno);
      query.setParameter("paxRefNum", paxRefNum);
View Full Code Here

        //search from VIAL
        LOG.debug("Looking for the flight from its VIAL..");
        entFlight = clsAfttabBeanLocal.findFlightFromVial(ffltNo, fltDate, _input.getFlightID().getDepStn(), _input.getFlightID().getArrStn());
      }
      //urno = (entFlight == null) ? new BigDecimal(0) : entFlight.getUrno();
      EntDbLoadPax load_pax = null;
      if(entFlight == null){
        LOG.error("Flight flno <{}> is not found. Message dropped.", ffltNo);
        addExptInfo(EnumExceptionCodes.ENOFL.name(), ffltNo);
        return false;
      }
      else{
        urno = entFlight.getUrno();
        load_pax = clsDlPaxBean.getPaxWithPaxRefNum(_input.getPaxDetails().getSeqNo(), String.valueOf(urno));
      }
      /*if(intFlid != null){
        //get the pax id
        load_pax = clsDlPaxBean.getPaxForPaxLounge(_input.getPaxDetails().getSeqNo(), intFlid);
      }*/
      
      id_load_pax = (load_pax == null)? "0" : load_pax.getUuid();
     
      //get lounge code id from cache
      boolean isFound = false;
      entLoungeCodeList = clsEntStartUpInitSingleton.getLoungeCodeList();
      for(int i = 0; i < entLoungeCodeList.size() ; i ++ ){
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.macs.entities.EntDbLoadPax

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.