Package com.ufis_as.ek_if.macs.entities

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


      // send notification
      ufisTopicProducer.sendNotification(true, UfisASCommands.IRT,
          String.valueOf(entDbLoadPax.getIdFlight()), null, entDbLoadPax);

      startTime = System.currentTimeMillis();
      EntDbLoadPaxConn paxConnForPax = _paxConBean.findByintFltRefX(
          entDbLoadPax.getPKId().getIntflid(), entDbLoadPax.getPKId()
              .getIntrefnumber());
      LOG.info("1.2.5+  search paxConn for Pax, takes {} ms",
          (System.currentTimeMillis() - startTime));

      if (paxConnForPax == null) {
        entDbLoadPax.setIdLoadPaxConnect("0");
        bagType = HpEKConstants.BAGTYPE_L;
      } else {
       
        EntDbLoadPaxConn  oldEntDbLoadPaxConn = (EntDbLoadPaxConn)SerializationUtils.clone(paxConnForPax);
       
        bagType = HpEKConstants.BAGTYPE_T;
        connOrigin3 = paxConnForPax.getBoardPoint();
        connDest3 = paxConnForPax.getOffPoint();
        connFlightNumber = paxConnForPax.getPaxConxFlno();
View Full Code Here


//    EntDbLoadPax entDbLoadPax = null;

    entDbLoadPaxConn.setIdConxFlight(idFlight);

    long startTime = System.currentTimeMillis();
    EntDbLoadPaxConn entDbLoadPaxConnFind = _paxConBean.findByintFltRefX(
        entDbLoadPaxConn.getPaxConnPK().getInterfaceFltid(),entDbLoadPaxConn.getPaxConnPK().getIntRefNumber());
    LOG.info(
        "1.2.3 search records from paxConn table for paxConn Msg,  takes {} ms",
        (System.currentTimeMillis() - startTime));
   
    EntDbLoadPaxConn oldEntDbLoadPaxConn = (EntDbLoadPaxConn)SerializationUtils.clone(entDbLoadPaxConnFind);

    if (entDbLoadPaxConnFind != null) {

      startTime = System.currentTimeMillis();
      Class<EntDbLoadPaxConn> entDbLoadPaxConnClass = EntDbLoadPaxConn.class;
View Full Code Here

            // send notification
            ufisTopicProducer.sendNotification(true, UfisASCommands.URT,
                String.valueOf(entDbLoadPax.getIdFlight()), oldEntDbLoadPax, entDbLoadPax);
           
            // update load_pax_connect
            EntDbLoadPaxConn entDbLoadPaxConn = _paxConBean
                .findByIdLoadPax(entDbLoadPax.getUuid());
            if (entDbLoadPaxConn != null
                && idFlight != entDbLoadPaxConn.getIdFlight()) {
     
              EntDbLoadPaxConn oldEntDbLoadPaxConn = (EntDbLoadPaxConn)SerializationUtils.clone(entDbLoadPaxConn);

              entDbLoadPaxConn.setIdFlight(idFlight);
              entDbLoadPaxConn
                  .set_updateUser(HpEKConstants.MACS_PAX_DATA_SOURCE);
              entDbLoadPaxConn.set_updatedDate(HpUfisCalendar
                  .getCurrentUTCTime());
//              _paxConBean.Update(entDbLoadPaxConn);
             
              // send notification
              ufisTopicProducer.sendNotification(true, UfisASCommands.URT,
                  String.valueOf(entDbLoadPaxConn.getIdFlight()), oldEntDbLoadPaxConn, entDbLoadPaxConn);
            }

            // update load_bag
            List<EntDbLoadBag> loadBagList = dlLoadBagUpdateLocal
                .getBagMoveDetailsByIdLoadPax(entDbLoadPax
                    .getUuid());
            Iterator<EntDbLoadBag> loadBagListIt = loadBagList
                .iterator();
            while (loadBagListIt.hasNext()) {
              EntDbLoadBag entDbLoadBag = loadBagListIt.next();
              if (idFlight != entDbLoadBag.getIdFlight()) {

                EntDbLoadBag oldEntDbLoadBag = (EntDbLoadBag)SerializationUtils.clone(entDbLoadBag);

                entDbLoadBag.setIdFlight(idFlight);
                entDbLoadBag
                    .setUpdatedUser(HpEKConstants.MACS_PAX_DATA_SOURCE);
                entDbLoadBag.setUpdatedDate(HpUfisCalendar
                    .getCurrentUTCTime());     
               
                // send notification
                ufisTopicProducer.sendNotification(true, UfisASCommands.URT,
                    String.valueOf(entDbLoadBag.getIdFlight()), oldEntDbLoadBag, entDbLoadBag);
              }

            }

            // update serviceReques
            List<EntDbServiceRequest> serviceRequestList = _dlPaxServiceRequestBean
                .findByidLoadPax(entDbLoadPax.getUuid());
            Iterator<EntDbServiceRequest> serviceRequestListIt = serviceRequestList
                .iterator();
            while (serviceRequestListIt.hasNext()) {
              EntDbServiceRequest entDbServiceRequest = serviceRequestListIt
                  .next();
              if (entDbServiceRequest.getIdFlight() != idFlight) {

                EntDbServiceRequest oldEntDbServiceRequest = (EntDbServiceRequest)SerializationUtils.clone(entDbServiceRequest);

                entDbServiceRequest.setIdFlight(idFlight);
                entDbServiceRequest
                    .set_updateUser(HpEKConstants.MACS_PAX_DATA_SOURCE);
                entDbServiceRequest
                    .set_updatedDate(HpUfisCalendar
                        .getCurrentUTCTime());
               
                // send notification
                ufisTopicProducer.sendNotification(true, UfisASCommands.URT,
                    String.valueOf(entDbServiceRequest.getIdFlight()), oldEntDbServiceRequest, entDbServiceRequest);
              }
            }

          }

        }

        // update id_conx_flight for load_pax_conn table
        if (entDbFlightIdMapping.getFltNumber() != null
            && entDbFlightIdMapping.getFltDateLocal() != null) {
          List<EntDbLoadPaxConn> entDbLoadPaxConnList = _paxConBean
              .findByFlnoFltDate(
                  entDbFlightIdMapping.getFltNumber(),
                  entDbFlightIdMapping.getFltDateLocal());
          Iterator<EntDbLoadPaxConn> entDbLoadPaxConnListIt = entDbLoadPaxConnList
              .iterator();
          while (entDbLoadPaxConnListIt.hasNext()) {
            EntDbLoadPaxConn entDbLoadPaxConn = entDbLoadPaxConnListIt
                .next();
            if (entDbFlightIdMapping.getIdFlight() != null
                && entDbLoadPaxConn.getIdConxFlight() != entDbFlightIdMapping
                    .getIdFlight().intValue()) {

              EntDbLoadPaxConn oldEntDbLoadPaxConn = (EntDbLoadPaxConn)SerializationUtils.clone(entDbLoadPaxConn);

              entDbLoadPaxConn
                  .setIdConxFlight(entDbFlightIdMapping
                      .getIdFlight().intValue());
              entDbLoadPaxConn
View Full Code Here

      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()));
           }
         }
         if (connIdFlightBuffer != null && connIdFlightBuffer.size() >0){
           List<EntDbLoadPaxConn>  oneFlightloadPaxConnList = null;
           for (int i =0; i < connIdFlightBuffer.size(); i++){
View Full Code Here

    }else if ("D".equalsIgnoreCase(String.valueOf(adid)) || "B".equalsIgnoreCase(String.valueOf(adid))){
      loa.setIdDepFlight(entDbFlightIdMapping.getIdFlight());
    }
   
    if (rawDataList != null && rawDataList.size() > 0 && rawDataList.get(0) instanceof EntDbLoadPaxConn ){
      EntDbLoadPaxConn entDbPaxConn = (EntDbLoadPaxConn)rawDataList.get(0);
     
      loa.setInterfaceFltId(new BigDecimal(entDbPaxConn.getInterfaceConxFltid()));
      // get string flight schedule date time
      String strFlightScheduleDateTime = " ";
      Date flightScheduleDateTime = entDbPaxConn.getConxFltDate();
      DateFormat df = new SimpleDateFormat("yyyymmddhhMMss");
      if (flightScheduleDateTime != null){
        strFlightScheduleDateTime = df.format(flightScheduleDateTime);
      }
     
      // set link flightID
      int linkFlightId = 0;
      linkFlightId = entDbPaxConn.getIdFlight();
      if ("A".equalsIgnoreCase(String.valueOf(adid))){
//        linkFlightId = dlAfttabBean.getUrnoFoDepFlight(entDbPaxConn.getAirlineCode(), entDbPaxConn.getFlightNumber().trim(), entDbPaxConn.getFlightNumberSuffice(), strFlightScheduleDateTime);     
        if (linkFlightId != 0){
          loa.setIdDepFlight(new BigDecimal(linkFlightId));
        }else{
//          loa.setIdDepFlight(" ");
        }
      }else if ("D".equalsIgnoreCase(String.valueOf(adid)) || "B".equalsIgnoreCase(String.valueOf(adid))){
//        linkFlightId = dlAfttabBean.getUrnoFoArrFlight(entDbPaxConn.getAirlineCode(), entDbPaxConn.getFlightNumber().trim(), entDbPaxConn.getFlightNumberSuffice(), strFlightScheduleDateTime);
        if (linkFlightId != 0){
          loa.setIdArrFlight(new BigDecimal(linkFlightId));
        }else{
//          loa.setIdArrFlight(" ");
        }
      }
     
      // set pax connection type
      loa.setConxType(entDbPaxConn.getConnType());
     
     
      }
    else{
//      // set default value and avoid showing null in database
View Full Code Here

        // -------------------------------------------------------------------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;
         
View Full Code Here

TOP

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

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.