Package com.ufis_as.ek_if.aacs.uld.entities

Examples of com.ufis_as.ek_if.aacs.uld.entities.EntDbLoadUld


                  + "BagTag = {}, " + "flight Number = {}, "
                  + "Flight Date= {}, ", new Object[] {
                  bagDetails.getBagInfo().getBagTag(),
                  flightNumber, fltDate });
        } else {
          EntDbLoadUld containerId = null;
          // if (HpBeltConfig.getGetLinkTables().equalsIgnoreCase(
          // HpEKBeltConfigConstants.CON_YES)) {
          startTime = new Date().getTime();
          if (idFlight != 0) {
            containerId = _loadUldBean.getUldNum(new BigDecimal(
                idFlight), bagDetails.getBagInfo()
                .getContainerID());
            LOG.debug(
                "Total Duration on searching ULD from LOAD_ULD (in ms): {}",
                new Date().getTime() - startTime);
            // !!!!!********** need to UNDO
            if (containerId == null) {
              LOG.warn("No ULD is found in LOAD_ULD "
                  + "idFlight:" + idFlight
                  + "   ContainerID:"
                  + bagDetails.getBagInfo().getContainerID()
                  + " for the Flight details:"
                  + "BagTag = {}, " + "flight Number = {}, "
                  + "Flight Date= {}, ", new Object[] {
                  bagDetails.getBagInfo().getBagTag(),
                  flightNumber, fltDate });
              // return false;

              if (HpCommonConfig.irmtab
                  .equalsIgnoreCase(HpUfisAppConstants.IrmtabLogLev.LOG_ERR
                      .name())) {
                if (!msgLogged) {
                  irmtabRef = _irmfacade.storeRawMsg(message,
                      dtflStr);
                  msgLogged = Boolean.TRUE;
                }
              }
              if (irmtabRef > 0) {
                sendErrInfo(EnumExceptionCodes.WNOUD,
                    "Container ID not found. Container ID: "
                        + bagDetails.getBagInfo()
                            .getContainerID()
                        + "  Bag Tag:"
                        + bagDetails.getBagInfo()
                            .getBagTag()
                        + "  Flight Number:"
                        + bagDetails.getFlightInfo()
                            .getFullFlightNumber()
                        + "  Flight Date:"
                        + bagDetails.getFlightInfo()
                            .getFlightDate(),
                    irmtabRef);

              }

            }
            // }
            if (containerId != null) {
              loadBagMove.setIdLoadUld(containerId.getId());
            }
          }
        }
        loadBagMove.setBagType(bagDetails.getBagInfo().getBagType()
            .value());
View Full Code Here


        LOG.debug("DB - URNO : {}, FLDA : {}, Flight Date Match : {}", entDbAfttab.getUrno(), entDbAfttab.getFlda(), flightDate.equals(entDbAfttab.getFlda()));
       
        boolean isDel = inputMeta.getSubtype().equalsIgnoreCase(OP_TYPE.DEL.name());
        HpUfisAppConstants.UfisASCommands cmdForBroadcasting;
       
        EntDbLoadUld oldLoadUld = null;
        EntDbLoadUld loadUld = (EntDbLoadUld) dLLoadUldBean.getUldNum(entDbAfttab.getUrno(), inputUldDetails.getULDNumber());
       
        //TODO: Log Telex message
       
        if(loadUld == null) {
          if(isDel){
            LOG.error("ULD record does not exist to delete. Message dropped.");
            addExptInfo(EnumExceptionCodes.ENOUD.name(), inputUldDetails.getULDNumber());
            return false;
          }
         
          loadUld = new EntDbLoadUld();
         
          initialize(loadUld, entDbAfttab);
         
          loadUld.setUldCurrFltno(flightNumber);
          loadUld.setUldNumber(inputUldDetails.getULDNumber().trim());
          loadUld.setCreatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
          loadUld.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.IRT;
        } else {
          oldLoadUld = new EntDbLoadUld(loadUld);
          loadUld.setUpdatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
          loadUld.setUpdatedDate(HpUfisCalendar.getCurrentUTCTime());
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.URT;
        }
       
        String uldCreatedDate = convertFlDateToUTC(TZ_DF_FORMATTER, inputUldDetails.getCreatedDate().trim());
        loadUld.setUldCreateDate(new HpUfisCalendar(uldCreatedDate).getTime());
        LOG.debug("ULD Created Date : {}, {}", uldCreatedDate, new HpUfisCalendar(uldCreatedDate).getTime());
       
        loadUld.setUldCreateUser(inputUldDetails.getCreatedBy().trim());
 
        if (!isNullOrEmptyStr(inputUldDetails.getModifiedDate())) {
          String uldModifiedDate = convertFlDateToUTC(TZ_DF_FORMATTER, inputUldDetails.getModifiedDate());
          loadUld.setUldUpdateDate(new HpUfisCalendar(uldModifiedDate).getTime());
          LOG.debug("ULD Modified Date : {}, {}", uldModifiedDate, new HpUfisCalendar(uldModifiedDate).getTime());
        }
 
        if (!isNullOrEmptyStr(inputUldDetails.getModifiedBy())) {
          loadUld.setUldUpdateUser(inputUldDetails.getModifiedBy().trim());
        }
 
        loadUld.setIdFlight(entDbAfttab.getUrno());
        loadUld.setDataSource(HpEKConstants.ULD_SOURCE_SKYCHAIN);
       
        String specialHandlingCodes = loadUld.getShcList();
        List<String> specialHandlingCodeList = isNullOrEmptyStr(specialHandlingCodes) ? Collections.EMPTY_LIST : Arrays.asList(specialHandlingCodes.toUpperCase().split("\\.")) ;
        String inputSHC = inputUldDetails.getSpecialHandlingCode().trim();
        if(!specialHandlingCodeList.contains(inputSHC.toUpperCase())) {
          loadUld.setShcList(isNullOrEmptyStr(specialHandlingCodes) ? inputSHC : specialHandlingCodes.concat(String.format(".%s", inputSHC)));
        }
       
        loadUld.setUldOwner(inputUldDetails.getOwnerCarrierCode());
        loadUld.setUldDest3(inputUldDetails.getPointOfLading());
        loadUld.setRecFlag(" ");
       
        if(isDel) {
          loadUld.setRecFlag("X");
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.DRT;
        }
         
        EntDbLoadUld resultUld = dLLoadUldBean.merge(loadUld);
        boolean success =  resultUld != null;
        if(success){
          if (HpUfisUtils.isNotEmptyStr(HpCommonConfig.notifyTopic)) {
            // send notification message to topic
            ufisTopicProducer.sendNotification(true, cmdForBroadcasting, String.valueOf(resultUld.getIdFlight()), oldLoadUld, resultUld);
          } else {
            // if topic not defined, send notification to queue
            ufisQueueProducer.sendNotification(true, cmdForBroadcasting, String.valueOf(resultUld.getIdFlight()), oldLoadUld, resultUld);
          }
          LOG.debug("Notify ULDs(ULD) from SkyChain");
        }
        LOG.debug("Uld No. {} has {}been processed.", loadUld.getUldNumber(), success ? "" : "not ");
       
View Full Code Here

    if(!cmd.equalsIgnoreCase(IRT.name()) && !cmd.equalsIgnoreCase(DRT.name()) && !cmd.equalsIgnoreCase(URT.name())) {
      LOG.warn("LoadUld record command is {} but not IRT/DRT/URT. The process won't be continued.", cmd);
      return;
    }
   
    EntDbLoadUld loadUld = formLoadUld(ufisMsgDTO);
    if(loadUld == null) {
      LOG.error("LoadUld cannot be created with provided data. The process will not be performed.");
      return;
    }
   
    LOG.info("ID_FLIGHT : {}, ID_CONX_FLIGHT : {}", loadUld.getIdFlight(), loadUld.getIdConxFlight());
   
    //To process only when both id_flight and id_conx_flight have value.
    if(loadUld.getIdFlight() == null || loadUld.getIdConxFlight() == null ||
        loadUld.getIdFlight().equals(BigDecimal.ZERO) || loadUld.getIdConxFlight().equals(BigDecimal.ZERO) ||
        loadUld.getIdFlight().equals(loadUld.getIdConxFlight())) {
      LOG.error("ID_FLIGHT[{}] and ID_CONX_FLIGHT[{}] must be provided and not be the same. Otherwise the process will not be performed.", loadUld.getIdFlight(), loadUld.getIdConxFlight());
      return;
    }
   
    switch(cmd) {
      case "IRT": processConxStatForIRT(loadUld);
View Full Code Here

    if(fldList.size() != data.size()) {
      LOG.error("Field list size and data list size are not equal. The process will not be performed.");
      return null;
    }
   
    EntDbLoadUld loadUld = new EntDbLoadUld();
   
    int i = 0;
    for (String fld : fldList) {
      switch(fld.toUpperCase()){
        case "ID_FLIGHT": loadUld.setIdFlight(BigDecimal.valueOf(Long.parseLong(data.get(i).toString()))); break;
        case "ID_CONX_FLIGHT" : loadUld.setIdConxFlight(BigDecimal.valueOf(Long.parseLong(data.get(i).toString()))); break;
      }
      i++;
    }
   
    return loadUld;
View Full Code Here

          addExptInfo(EnumExceptionCodes.ENOFL.name(), flno);
          return false;
        }
        urno = entFlight.getUrno();
        String uldNumber = _inputUldScanInfo.getULDNUMBER().trim();
        EntDbLoadUld entUld = _dlLoadUldBean.getUldNum(urno, uldNumber);
        idUld = (entUld == null) ? "0" : entUld.getId();
       
        boolean flag = false;
        String cmdForBroadcasting =  null;
        EntDbLoadUldMove loadUldMove = null;
        EntDbLoadUldMove oldLoadUldMove = null;
View Full Code Here

      Map<EntDbLoadUld, EntDbLoadUld> updatedLoadUlds = new HashMap<>();
     
      //TODO: to confirm mei => if no value eg weight status in xml but there is in db, shall update with blank???
      for (UWSULDDetails uwsUld : uwsInfo.getUWSULDDetails()) {
        //TODO: to refactor ummmm
        EntDbLoadUld loadUld = existedLoadUlds(existingLoadUlds, uwsUld.getULDNumber());
        EntDbLoadUld originalUld = null;
        boolean isExisted = true;
        if(loadUld == null) {
          loadUld = new EntDbLoadUld();
          isExisted = false;
          initialize(loadUld, entDbAfttab);
        } else {
          originalUld = new EntDbLoadUld(loadUld);
        }
        loadUld.setIdFlight(entDbAfttab.getUrno());
        loadUld.setUldCurrFltno(flightNumber);
        loadUld.setUldNumber(uwsUld.getULDNumber());
        loadUld.setUldDest3(uwsUld.getDest3());
        loadUld.setUldWeight(uwsUld.getWeight()+"");
        loadUld.setUldWeightStatus(uwsUld.getWeightStatus());
        loadUld.setUldLoadCat1(uwsUld.getLoadCat1());
        loadUld.setUldLoadCat2(uwsUld.getLoadCat2());
        loadUld.setUldContourCode(uwsUld.getLoadContourCode());
        loadUld.setUldContourNum(uwsUld.getLoadContourNumber());
        loadUld.setShcList(uwsUld.getShcList());
        loadUld.setShcRemarks(uwsUld.getShcRemarks());
        loadUld.setDataSource(HpEKConstants.ULD_SOURCE_SKYCHAIN);
        loadUld.setRecFlag(" ");

        if(isExisted) {
          loadUld.setUpdatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
          loadUld.setUpdatedDate(HpUfisCalendar.getCurrentUTCTime());
          updatedLoadUlds.put(loadUld, originalUld);
        } else {
          loadUld.setCreatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
          loadUld.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
          newLoadUlds.add(loadUld);
        }
       
      }
     
      if(!uwsInfo.getBULKULDDetails().isEmpty()) {
        //Delete existing bulk records regarding the provided flight
        dLLoadUldBean.deleteBulkUldsByFlight(entDbAfttab.getUrno());
      }
     
      for (BULKULDDetails bulkUld : uwsInfo.getBULKULDDetails()) {
        //TODO: to refactor ummmm
        EntDbLoadUld loadUld = new EntDbLoadUld();
        initialize(loadUld, entDbAfttab);
        loadUld.setUldNumber(bulkUld.getULDNumber());
        loadUld.setIdFlight(entDbAfttab.getUrno());
        loadUld.setUldCurrFltno(flightNumber);
        loadUld.setUldDest3(bulkUld.getDest3());
        loadUld.setUldWeight(bulkUld.getWeight()+"");
        loadUld.setUldWeightStatus(bulkUld.getWeightStatus());
        loadUld.setUldLoadCat1(bulkUld.getLoadCat1());
        loadUld.setUldLoadCat2(bulkUld.getLoadCat2());
        loadUld.setUldContourCode(bulkUld.getLoadContourCode());
        loadUld.setUldContourNum(bulkUld.getLoadContourNumber());
        loadUld.setShcList(bulkUld.getShcList());
        loadUld.setShcRemarks(bulkUld.getShcRemarks());
        loadUld.setDataSource(HpEKConstants.ULD_SOURCE_SKYCHAIN);
        loadUld.setRecFlag(" ");
        loadUld.setCreatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
        loadUld.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
       
        newLoadUlds.add(loadUld);
      }
     
     
      for (SIULDDetails siUld : uwsInfo.getSIULDDetails()) {
        EntDbLoadUld loadUld = existedLoadUlds(updatedLoadUlds.keySet(), siUld.getULDNumber());
        if(loadUld == null) {
          loadUld = existedLoadUlds(newLoadUlds, siUld.getULDNumber());
        }
        if(loadUld != null) {
          String temp = siUld.getRampTransferFlno();
         
          //TODO: clean code, to reimplement or refactor
          //Reset if there is no QRTX
          if(isNullOrEmptyStr(temp)) {
            loadUld.setRampTransferFlag("");
            loadUld.setRampTransferFlno("");
            loadUld.setIdRampTransferFlight("");
          } else {
            //FIXME: to write API for flight format. This is just temp fix
            loadUld.setRampTransferFlag("Y");
           
            String rampFltNo = formatFlightNo(temp);
           
            LOG.debug("Ramp Transfer Flno - {}", rampFltNo);
            loadUld.setRampTransferFlno(rampFltNo);
           
            HpUfisCalendar startDate = new HpUfisCalendar();
            startDate.setTime(entDbAfttab.getTifd());// eg. 06/19/2013 21:45
            startDate.add(Calendar.HOUR, basicDataSingleton.getRampOffset()); // eg. 06/19/2013 13:45

            HpUfisCalendar endDate = new HpUfisCalendar();
            endDate.setTime(entDbAfttab.getTifd());// eg. 06/19/2013 21:45
           
            LOG.debug("Ramp Tnxfer Flight Criteria : RampTnxferFlno - {}, Startdate - {}, EndDate - {}", loadUld.getRampTransferFlno(), startDate.toString(), endDate.toString());
            EntDbAfttab entDbAfttabTransfer = afttabBean.findRampTransferFlight(loadUld.getRampTransferFlno(), startDate, endDate);
           
            //TODO: to confirm -> if no msg, jz drop whole msg?
            if(entDbAfttabTransfer != null) {
              loadUld.setIdRampTransferFlight(entDbAfttabTransfer.getUrno()+"");
            } else {
              LOG.warn("No flight is found for ramp transfer.");
            }
           
            String transferFltDebugInfo = String.format(", Ramp Tnxfer Flno (PKey) - %s[%s]", loadUld.getRampTransferFlno(), isNullOrEmptyStr(loadUld.getIdRampTransferFlight()) ? "No P-Key found"
                : loadUld.getIdRampTransferFlight());
           
            LOG.warn(
                "ULD for transfer flight : ULD - {}, {}", loadUld.getUldNumber(), transferFltDebugInfo);
          }
         
        } else {
          LOG.warn("ULD for transfer flight is not found {}", siUld.getULDNumber());
        }
      }

      int total = 0;
      int index = 0;
      for (Entry<EntDbLoadUld, EntDbLoadUld> entry : updatedLoadUlds.entrySet()) {
        boolean isLast = (index == updatedLoadUlds.entrySet().size() - 1 && newLoadUlds.isEmpty());
        EntDbLoadUld resultUld = dLLoadUldBean.merge(entry.getKey());
        boolean success =  resultUld != null;
        if(success){
          EntDbLoadUld original = entry.getValue();
          if (HpUfisUtils.isNotEmptyStr(HpCommonConfig.notifyTopic)) {
            // send notification message to topic
            ufisTopicProducer.sendNotification(isLast, HpUfisAppConstants.UfisASCommands.URT, String.valueOf(resultUld.getIdFlight()), original, resultUld);
          } else {
            // if topic not defined, send notification to queue
            ufisQueueProducer.sendNotification(isLast, HpUfisAppConstants.UfisASCommands.URT, String.valueOf(resultUld.getIdFlight()), original, resultUld);
          }
          LOG.debug("Notify ULDs(UWS) from SkyChain");
        }
        LOG.debug("Uld No. {} has {}been processed.", entry.getKey().getUldNumber(), success ? "" : "not ");
        index++;
        total++;
      }
     
      index = 0;
      for (EntDbLoadUld entDbLoadUld : newLoadUlds) {
        boolean isLast = index == newLoadUlds.size() - 1;
        EntDbLoadUld resultUld = dLLoadUldBean.merge(entDbLoadUld);
        boolean success =  resultUld != null;
        if(success){
          if (HpUfisUtils.isNotEmptyStr(HpCommonConfig.notifyTopic)) {
            // send notification message to topic
            ufisTopicProducer.sendNotification(isLast, HpUfisAppConstants.UfisASCommands.IRT, String.valueOf(resultUld.getIdFlight()), null, resultUld);
          } else {
            // if topic not defined, send notification to queue
            ufisQueueProducer.sendNotification(isLast, HpUfisAppConstants.UfisASCommands.IRT, String.valueOf(resultUld.getIdFlight()), null, resultUld);
          }
          LOG.debug("Notify ULDs(UWS) from SkyChain");
        }
        LOG.debug("Uld No. {} has {}been processed.", entDbLoadUld.getUldNumber(), success ? "" : "not ");
        index++;
View Full Code Here

          act3 = entFlight.getAct3().trim();
          act5 = entFlight.getAct5().trim();
        }
        connectedUrno = (connectedUrno == null) ? new BigDecimal(0) : connectedUrno;
       
        EntDbLoadUld loadUld = null;
        EntDbLoadUld oldLoadUld = null;
        String cmdForBroadcasting = null;
       
        //find existing record depending on IdFlight and UldNumber..
        loadUld = _dlLoadUldBean.getUldNum(urno, _inputUldInfo.getULDNO());
       
        if(loadUld == null){
          if("Y".equals(_inputUldInfo.getULDISDELETED())){
            LOG.error("ULD record does not exist to delete. Message dropped.");
            addExptInfo(EnumExceptionCodes.ENOUD.name(), _inputUldInfo.getULDISDELETED());
            return false;
          }
          loadUld = new EntDbLoadUld();
          loadUld.setFltDate(new HpUfisCalendar(flDate).getTime());
          loadUld.setUldCurrFltno(flno);
          loadUld.setUldNumber(_inputUldInfo.getULDNO());
          loadUld.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
          loadUld.setCreatedUser(HpEKConstants.ULD_SOURCE);
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.IRT.name();
        }
        else{
          oldLoadUld = new EntDbLoadUld(loadUld);
          loadUld.setUpdatedUser(HpEKConstants.ULD_SOURCE);
          loadUld.setUpdatedDate(HpUfisCalendar.getCurrentUTCTime());
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.URT.name();
        }
         
        loadUld.setIdFlight(urno);
        loadUld.setIdConxFlight(connectedUrno);
       
        // only when the value is exist, check against the md value
        if(!HpUfisUtils.isNullOrEmptyStr(_inputUldInfo.getULDPOSITION())){
          //set the ULD Basic Data
          List<EntDbMdUldPos> uldPosList = _BasicDataSingleton.getUldPosList();
          boolean isFound = false;
         
          if(!uldPosList.isEmpty()){
            for(int i = 0; i < uldPosList.size(); i++){
              //get uld pos according to act3, act5 and position name
              if(entFlight != null){
                if(uldPosList.get(i).getAircraftType3().trim().equals(act3) &&
                    uldPosList.get(i).getAircraftType5().trim().equals(act5) &&
                    uldPosList.get(i).getUldPosition().trim().equals(_inputUldInfo.getULDPOSITION())){
                  loadUld.setIdMdUldPos(uldPosList.get(i).getId());
                  isFound = true;
                  break;
                }
              }
            }
          }
          if(!isFound){
            LOG.warn("Master Data Uld Position is not match in MdUldPos.");
            addExptInfo(EnumExceptionCodes.WNOMD.name(), String.format("ULD_POSITION => %s", _inputUldInfo.getULDPOSITION()));
          }
        } else
          LOG.error("Input ULD_POSITION is empty/blank.");
       
        loadUld = checkUldInfoMaterdata(_inputUldInfo, loadUld);//call to check MD
        loadUld.setDataSource(HpEKConstants.ULD_SOURCE);
       
        loadUld.setArrDepFlag(_inputUldInfo.getFLIGHTAD());
        loadUld.setUldPosition(_inputUldInfo.getULDPOSITION());
        loadUld.setUldType(_inputUldInfo.getULDTYPE());
        loadUld.setUldSubtype(_inputUldInfo.getULDSUBTYPE());
        loadUld.setUldItemtype(_inputUldInfo.getULDITEMTYPE());
        loadUld.setUldWeight(_inputUldInfo.getULDWEIGHT());
        loadUld.setUldDispLocCode(_inputUldInfo.getULDDISPATCHTOLOCCODE());
        loadUld.setUldDispLocDesc(_inputUldInfo.getULDDISPATHCTOLOCDESC());
        String status = " ";
        if("Y".equals(_inputUldInfo.getULDISDELETED())){
          status = "X";
          cmdForBroadcasting = HpUfisAppConstants.UfisASCommands.DRT.toString()
        }
       
        loadUld.setRecFlag(status);
        loadUld.setUldConxFlno(connectedFlno);
        if(connectedFlDate != null)
          loadUld.setConxFltDate(new HpUfisCalendar(connectedFlDate).getTime());
        loadUld.setConxToUld(_inputUldInfo.getCONNULDNO());
        if(!HpUfisUtils.isNullOrEmptyStr(_inputUldInfo.getRECORDSENDDATE()))
          loadUld.setUldSentDate(new HpUfisCalendar(convertFlDateToUTC(_inputUldInfo.getRECORDSENDDATE())).getTime());
       
        EntDbLoadUld resultUld = _dlLoadUldBean.merge(loadUld);
       
        if(resultUld != null){
          sendNotifyUldInfoToInJson(resultUld, oldLoadUld, cmdForBroadcasting);
        }
      }
View Full Code Here

    public void persist(EntDbLoadUld entity){
      em.persist(entity);  
    }
   
    public EntDbLoadUld merge(EntDbLoadUld entity){
      EntDbLoadUld loadUld = null;
      try{
        loadUld = em.merge(entity);
      } catch (OptimisticLockException opEx) {
        LOG.error("Optimistics Lock Exception for LOAD ULD !!! {}", opEx.toString());
      } catch(Exception ex){
View Full Code Here

    }
   
    public EntDbLoadUld getUldNum(BigDecimal idFlight, String uld_number){
      //LOG.debug("==== Searching ULD for Movement ====");
      List<EntDbLoadUld> resultList  = null;
      EntDbLoadUld result = null;
      Query query = getEntityManager().createNamedQuery("EntDbLoadUld.findUld");
      query.setParameter("idFlight", idFlight);
      query.setParameter("uldNumber", uld_number);
      query.setParameter("recStatus", "X");
      try{
        resultList =  query.getResultList();
      if (resultList.size() > 0) {
        result = resultList.get(0);
          LOG.debug("Uld record is found. ID : {}", result.getId());
        }
      else
        LOG.debug("Uld record is not found");
    } catch (Exception nur) {
      LOG.error("ERROR when retriving uld number : "+ nur.getMessage());
View Full Code Here

      return result;
    }
   
    public EntDbLoadUld getUldByPk(Date fldate, String flno, String uldno){
      //LOG.debug("==== Searching ULD ====");
      EntDbLoadUld result  = null;
      DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
      try{
        Query query = getEntityManager().createNamedQuery("EntDbLoadUld.findUldByPk");
        query.setParameter("uldCurrFltno", flno);
        query.setParameter("uldNumber", uldno);
        query.setParameter("fltDate", formatter.format(fldate));
        query.setParameter("recStatus", "X");
       
        List<EntDbLoadUld> resultList = query.getResultList();
        if(resultList.size()>0){
          result = resultList.get(0);
          LOG.debug("Uld record found. ID : {}", result.getId());
        }
        else
          LOG.debug("ULD is not found");
    } catch (Exception nur) {
      LOG.error("ERROR finding uld record ", nur.toString());
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.aacs.uld.entities.EntDbLoadUld

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.