Examples of LoadPaxConnPK


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

      HpUfisCalendar ufisCalendar = new HpUfisCalendar();
      ufisCalendar.setCustomFormat(HpEKConstants.MACS_TIME_FORMAT); // 2012-12-18
                                      // 00:00:00

      EntDbLoadPaxConn edpiod = new EntDbLoadPaxConn();
      LoadPaxConnPK paxConnPk = new LoadPaxConnPK();

      // To check and set the mandatory fields first
      // check as it's a mandatory field
      if (inbDetails.getInbId() != null
          && !inbDetails.getInbId().isEmpty()) {
        edpiod.setIntId(inbDetails.getInbId());
      } else {
        LOG.info("Mandatory field INB_ID is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (inbDetails.getMflId() != null
          && !inbDetails.getMflId().isEmpty()) {
        paxConnPk.setInterfaceFltid(inbDetails.getMflId());
//        edpiod.setInterfaceFltid(inbDetails.getMflId());
      } else {
        LOG.info("Mandatory field MFL_ID is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (inbDetails.getBoardPoint() != null
          && !inbDetails.getBoardPoint().isEmpty()) {
        edpiod.setBoardPoint(inbDetails.getBoardPoint());
      } else {
        LOG.info("Mandatory field BOARD_POINT is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (inbDetails.getOffPoint() != null
          && !inbDetails.getOffPoint().isEmpty()) {
        edpiod.setOffPoint(inbDetails.getOffPoint());
      } else {
        LOG.info("Mandatory field OFF_POINT is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // // check as it's a mandatory field
      // if (inbDetails.getAirlineDesignator() != null &&
      // !inbDetails.getAirlineDesignator().isEmpty()){
      // edpiod.setAirlineCode(inbDetails.getAirlineDesignator());
      // }else{
      // LOG.info("Mandatory field AIRLINE_DESIGNATOR is null or empty, Inbound Message is rejected");
      // // return null;
      // }

      // check as it's a mandatory field
      if (inbDetails.getAirlineDesignator() == null
          || inbDetails.getAirlineDesignator().isEmpty()) {
        LOG.info("Mandatory field AIRLINE_DESIGNATOR is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // // check as it's a mandatory field
      // if (inbDetails.getFlightNumber() != null &&
      // !inbDetails.getFlightNumber().isEmpty()){
      // String strFlightNumber = inbDetails.getFlightNumber();
      // strFlightNumber = HpUfisUtils.formatCedaFltn(strFlightNumber);
      // // if (strFlightNumber.length() != 3){
      // // strFlightNumber =
      // Integer.toString(Integer.parseInt(strFlightNumber));
      // // if (strFlightNumber.length() < 3){
      // // int numAdd = 3 - strFlightNumber.length();
      // // for (int i= 0; i < numAdd; i++ ){
      // // strFlightNumber = "0"+strFlightNumber;
      // // }
      // // }
      // // }
      // edpiod.setFlightNumber(strFlightNumber);
      // }else{
      // LOG.info("Mandatory field FLIGHT_NUMBER is null or empty, Inbound Message is rejected");
      // // return null;
      // }

      // check as it's a mandatory field
      if (inbDetails.getFlightNumber() == null
          || inbDetails.getFlightNumber().isEmpty()) {
        LOG.info("Mandatory field FLIGHT_NUMBER is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // if(inbDetails.getFlightNumberExp() != null){
      // edpiod.setFlightNumberSuffice(inbDetails.getFlightNumberExp());
      // }else{
      // edpiod.setFlightNumberSuffice(" "); // default value
      // }

      // check as it's a mandatory field
      if (inbDetails.getOperationDate() != null
          && !inbDetails.getOperationDate().isEmpty()) {
        ufisCalendar.setTime(inbDetails.getOperationDate(),
            ufisCalendar.getCustomFormat());
        if (inbDetails.getOperationTime().length() >= 4) {
          int hour = 0;
          int min = 0;
          try {
            hour = Integer.parseInt(inbDetails.getOperationTime()
                .substring(0, 2));
            min = Integer.parseInt(inbDetails.getOperationTime()
                .substring(2, 4));
          } catch (Exception e) {
            LOG.info("Inbound message OperationTime parse erro");
          }
          ufisCalendar.DateAdd(hour, EnumTimeInterval.Hours);
          ufisCalendar.DateAdd(min, EnumTimeInterval.Minutes);

        }
        edpiod.setConxFltDate(ufisCalendar.getTime());
      } else {
        LOG.info("Mandatory field OPERATION_DATE is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (inbDetails.getReferenceNumber() != null
          && !inbDetails.getReferenceNumber().isEmpty()) {
//        edpiod.setIntRefNumber(inbDetails.getReferenceNumber());
        paxConnPk.setIntRefNumber(inbDetails.getReferenceNumber());
      } else {
        LOG.info("Mandatory field REFERENCE_NUMBER is null or empty, Inbound Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }
View Full Code Here

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

        if (irmtabRef > 0) {
          msgLogged = Boolean.TRUE;
        }
     
      EntDbLoadPaxConn edpiod = new EntDbLoadPaxConn();
      LoadPaxConnPK paxConnPk = new LoadPaxConnPK();
     
      HpUfisCalendar ufisCalendar = new HpUfisCalendar();
      ufisCalendar.setCustomFormat(HpEKConstants.MACS_TIME_FORMAT); // 2012-12-18
                                      // 00:00:00

      // check as it's a mandatory field
      if (ownDetails.getOnwId() != null
          && !ownDetails.getOnwId().isEmpty()) {
        edpiod.setIntId(ownDetails.getOnwId());
      } else {
        LOG.info("Mandatory field ONW_ID is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (ownDetails.getMflId() != null
          && !ownDetails.getMflId().isEmpty()) {
//        edpiod.setInterfaceFltid(ownDetails.getMflId());
        paxConnPk.setInterfaceFltid(ownDetails.getMflId());
      } else {
        LOG.info("Mandatory field MFL_ID is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (ownDetails.getBoardPoint() != null
          && !ownDetails.getBoardPoint().isEmpty()) {
        edpiod.setBoardPoint(ownDetails.getBoardPoint());
      } else {
        LOG.info("Mandatory field BOARD_POINT is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // check as it's a mandatory field
      if (ownDetails.getOffPoint() != null
          && !ownDetails.getOffPoint().isEmpty()) {
        edpiod.setOffPoint(ownDetails.getOffPoint());
      } else {
        LOG.info("Mandatory field OFF_POINT is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // // check as it's a mandatory field
      // if (ownDetails.getAirlineDesignator() != null &&
      // !ownDetails.getAirlineDesignator().isEmpty()){
      // edpiod.setAirlineCode(ownDetails.getAirlineDesignator());
      // }else{
      // LOG.info("Mandatory field AIRLINE_DESIGNATOR is null or empty, Onward Message is rejected");
      // // return null;
      // }

      // check as it's a mandatory field
      if (ownDetails.getAirlineDesignator() == null
          || ownDetails.getAirlineDesignator().isEmpty()) {
        LOG.info("Mandatory field AIRLINE_DESIGNATOR is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // // check as it's a mandatory field
      // if (ownDetails.getFlightNumber() != null &&
      // !ownDetails.getFlightNumber().isEmpty()){
      // String strFlightNumber = ownDetails.getFlightNumber();
      // strFlightNumber = HpUfisUtils.formatCedaFltn(strFlightNumber);
      // // if (strFlightNumber.length() != 3){
      // // strFlightNumber =
      // Integer.toString(Integer.parseInt(strFlightNumber));
      // // if (strFlightNumber.length() < 3){
      // // int numAdd = 3 - strFlightNumber.length();
      // // for (int i= 0; i < numAdd; i++ ){
      // // strFlightNumber = "0"+strFlightNumber;
      // // }
      // // }
      // // }
      //
      // edpiod.setFlightNumber(strFlightNumber);
      // }else{
      // LOG.info("Mandatory field FLIGHT_NUMBER is null or empty, Onward Message is rejected");
      // // return null;
      // }

      // check as it's a mandatory field
      if (ownDetails.getFlightNumber() == null
          || ownDetails.getFlightNumber().isEmpty()) {
        LOG.info("Mandatory field FLIGHT_NUMBER is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

      // if(ownDetails.getFlightNumberExp() != null){
      // edpiod.setFlightNumberSuffice(ownDetails.getFlightNumberExp());
      // }else{
      // edpiod.setFlightNumberSuffice(" "); // default value
      // }

      // check as it's a mandatory field
      if (ownDetails.getOperationDate() != null
          && !ownDetails.getOperationDate().isEmpty()) {
        ufisCalendar.setTime(ownDetails.getOperationDate(),
            ufisCalendar.getCustomFormat());
        if (ownDetails.getOperationTime().length() >= 4) {
          int hour = 0;
          int min = 0;
          try {
            hour = Integer.parseInt(ownDetails.getOperationTime()
                .substring(0, 2));
            min = Integer.parseInt(ownDetails.getOperationTime()
                .substring(2, 4));
          } catch (Exception e) {
            LOG.info("Onward message OperationTime parse erro");
          }
          ufisCalendar.DateAdd(hour, EnumTimeInterval.Hours);
          ufisCalendar.DateAdd(min, EnumTimeInterval.Minutes);
        }
        edpiod.setConxFltDate(ufisCalendar.getTime());
      } else {
        LOG.info("Mandatory field OPERATION_DATE is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }

//      // check as it's a mandatory field
//      if (ownDetails.getOperationDate() == null
//          || ownDetails.getOperationDate().isEmpty()) {
//        LOG.info("Mandatory field OPERATION_DATE is null or empty, Onward Message is rejected");
//        addExptInfo(EnumExceptionCodes.EMAND,irmtabRef.name(), "OPERATION_DATE");
//        // return null;
//      }

      // check as it's a mandatory field
      if (ownDetails.getReferenceNumber() != null
          && !ownDetails.getReferenceNumber().isEmpty()) {
//        edpiod.setIntRefNumber(ownDetails.getReferenceNumber());
        paxConnPk.setIntRefNumber(ownDetails.getReferenceNumber());
      } else {
        LOG.info("Mandatory field REFERENCE_NUMBER is null or empty, Onward Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         return null;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.