Package com.ufis_as.ek_if.macs.entities

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


         odat.add(oloadPaxConn.getOffPoint());
       }


    }else if (data instanceof EntDbServiceRequestX){
      EntDbServiceRequestX serviceRequest = (EntDbServiceRequestX) data;
//      fld.add(Integer.toString(serviceRequest.getIdFlight()));
      tabName = "SERVICE_REQUEST";
      selectStr = "WHERE ID = '"+serviceRequest.getUuid()+"'";
      idFlightStr = Integer.toString(serviceRequest.getIdFlight());
      ld.add(serviceRequest.getUuid());
      // add fields
//      fld.add("ID");
       fld.add("INTFLID");
       fld.add("INTREFNUMBER");
       fld.add("ID_FLIGHT");
       fld.add("DATA_SOURCE");
       fld.add("INTID");
       fld.add("REQUESTTYPE");
       fld.add("SERVICECODE");
       fld.add("SERVICETYPE");
       fld.add("EXTINFO");
       fld.add("ID_LOAD_PAX");
       // populate fields
//      dat.add(serviceRequest.getUuid());
       dat.add(serviceRequest.getIntFlId());
       dat.add(serviceRequest.getIntRefNumber());
       dat.add(serviceRequest.getIdFlight());
       dat.add(serviceRequest.getIntSystem());
       dat.add(serviceRequest.getIntId());
       dat.add(serviceRequest.getRequestType());
       dat.add(serviceRequest.getServiceCode());
       dat.add(serviceRequest.getServiceType());
       dat.add(serviceRequest.getExtInfo());
       dat.add(serviceRequest.getIdLoadPax());
      
       if (odat != null && odat instanceof EntDbServiceRequestX){
         EntDbServiceRequestX oserviceRequest = (EntDbServiceRequestX) oldData;
//        dat.add(oserviceRequest.getUuid());
         odat.add(oserviceRequest.getIntFlId());
         odat.add(oserviceRequest.getIntRefNumber());
         odat.add(oserviceRequest.getIdFlight());
         odat.add(oserviceRequest.getIntSystem());
         odat.add(oserviceRequest.getIntId());
         odat.add(oserviceRequest.getRequestType());
         odat.add(oserviceRequest.getServiceCode());
         odat.add(oserviceRequest.getServiceType());
         odat.add(oserviceRequest.getExtInfo());
         odat.add(oserviceRequest.getIdLoadPax());
       }
    }else if (data instanceof EntDbLoadBag){
      EntDbLoadBag loadBag = (EntDbLoadBag) data;
//      fld.add(Long.toString(loadBag.getIdFlight()));
      tabName = "LOAD_BAG";
View Full Code Here


      break;
    case "fct":
      try {
        if ( msgString.contains("FctDetails")) {
          Object o = blHandleMacsPax.unMarshal(name, msgString, irmtabRef, message);
          EntDbServiceRequestX entDbServiceRequest =null;
          if (o != null){
            entDbServiceRequest =  (EntDbServiceRequestX)o;
          }

          if (entDbServiceRequest != null){
View Full Code Here

         odat.add(oloadPaxConn.getOffPoint());
       }


    }else if (data instanceof EntDbServiceRequestX){
      EntDbServiceRequestX serviceRequest = (EntDbServiceRequestX) data;
//      fld.add(Integer.toString(serviceRequest.getIdFlight()));
      tabName = "SERVICE_REQUEST";
      selectStr = "WHERE ID = '"+serviceRequest.getUuid()+"'";
      idFlightStr = Integer.toString(serviceRequest.getIdFlight());
      ld.add(serviceRequest.getUuid());
      // add fields
//      fld.add("ID");
       fld.add("INTFLID");
       fld.add("INTREFNUMBER");
       fld.add("ID_FLIGHT");
       fld.add("DATA_SOURCE");
       fld.add("INTID");
       fld.add("REQUESTTYPE");
       fld.add("SERVICECODE");
       fld.add("SERVICETYPE");
       fld.add("EXTINFO");
       fld.add("ID_LOAD_PAX");
       // populate fields
//      dat.add(serviceRequest.getUuid());
       dat.add(serviceRequest.getIntFlId());
       dat.add(serviceRequest.getIntRefNumber());
       dat.add(serviceRequest.getIdFlight());
       dat.add(serviceRequest.getIntSystem());
       dat.add(serviceRequest.getIntId());
       dat.add(serviceRequest.getRequestType());
       dat.add(serviceRequest.getServiceCode());
       dat.add(serviceRequest.getServiceType());
       dat.add(serviceRequest.getExtInfo());
       dat.add(serviceRequest.getIdLoadPax());
      
       if (odat != null && odat instanceof EntDbServiceRequestX){
         EntDbServiceRequestX oserviceRequest = (EntDbServiceRequestX) oldData;
//        dat.add(oserviceRequest.getUuid());
         odat.add(oserviceRequest.getIntFlId());
         odat.add(oserviceRequest.getIntRefNumber());
         odat.add(oserviceRequest.getIdFlight());
         odat.add(oserviceRequest.getIntSystem());
         odat.add(oserviceRequest.getIntId());
         odat.add(oserviceRequest.getRequestType());
         odat.add(oserviceRequest.getServiceCode());
         odat.add(oserviceRequest.getServiceType());
         odat.add(oserviceRequest.getExtInfo());
         odat.add(oserviceRequest.getIdLoadPax());
       }
    }else if (data instanceof EntDbLoadBag){
      EntDbLoadBag loadBag = (EntDbLoadBag) data;
//      fld.add(Long.toString(loadBag.getIdFlight()));
      tabName = "LOAD_BAG";
View Full Code Here

//          "1.2.2 pax not found for service request msg send exception msg, takes {}",
//          System.currentTimeMillis() - startTime);
    }

    long startTime = System.currentTimeMillis();
    EntDbServiceRequestX entDbPaxServiceRequestFind = _dlPaxServiceRequestBean.findByPkIdX(entDbPaxServiceRequest.getIntFlId(),entDbPaxServiceRequest.getIntRefNumber());
    LOG.info(
        "1.2.3 search records from ServiceRequest table for Fct Msg, takes {}",
        (System.currentTimeMillis() - startTime));

    if (entDbPaxServiceRequestFind != null) {
      startTime = System.currentTimeMillis();
     
      EntDbServiceRequestX oldEntDbServiceRequest = (EntDbServiceRequestX)SerializationUtils.clone(entDbPaxServiceRequestFind);
     

      // update serviceRequest
//      // change to use static code
      entDbPaxServiceRequestFind.setIntFlId(entDbPaxServiceRequest.getIntFlId());
View Full Code Here

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

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

                entDbServiceRequest.setIdFlight(idFlight);
                entDbServiceRequest
                    .set_updateUser(HpEKConstants.MACS_PAX_DATA_SOURCE);
                entDbServiceRequest
View Full Code Here

//    }
    return result;
  }

  public EntDbServiceRequestX readStorePax(FctDetails fctDetails, long irmtabRef, Message message) {
    EntDbServiceRequestX result = null;

    if (fctDetails != null) {
     
      logLevel = entStartupInitSingleton.getIrmLogLev();
       
        msgLogged = Boolean.FALSE;
        if (irmtabRef > 0) {
          msgLogged = Boolean.TRUE;
        }
     
      EntDbServiceRequestX edpiod = new EntDbServiceRequestX();
//      ServiceRequestPK serviceRequestPK =  new ServiceRequestPK();
     
      edpiod.setIntSystem("MACS");

      // check as it's a mandatory field
      if (fctDetails.getFCTID() != null
          && !fctDetails.getFCTID().isEmpty()) {
        edpiod.setIntId(fctDetails.getFCTID());
      } else {
        LOG.info("Mandatory field FCT_ID is null or empty, Fact Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field FCT_ID is null or empty, Fact Message is rejected",irmtabRef, message);
         return null;
      }

      // check as it's a mandatory field
      if (fctDetails.getMFLID() != null
          && !fctDetails.getMFLID().isEmpty()) {
//        edpiod.setIntFlId(fctDetails.getMFLID());
        edpiod.setIntFlId(fctDetails.getMFLID());
      } else {
        LOG.info("Mandatory field MFL_ID is null or empty, Fact Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field MFL_ID is null or empty, Fact Message is rejected",irmtabRef, message);
         return null;
      }

      // check as it's a mandatory field
      if (fctDetails.getREFERENCENUMBER() != null
          && !fctDetails.getREFERENCENUMBER().isEmpty()) {
//        edpiod.setIntRefNumber(fctDetails.getREFERENCENUMBER());
        edpiod.setIntRefNumber(fctDetails.getREFERENCENUMBER());
      } else {
        LOG.info("Mandatory field REFERENCENUMBER is null or empty, Fact Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND.name(),"Mandatory field REFERENCENUMBER is null or empty, Fact Message is rejected",irmtabRef, message);
         return null;
      }

//      edpiod.setServiceRequestPK(serviceRequestPK);
     
      edpiod.setRequestType(fctDetails.getOSISSR());
//      edpiod.setServiceCode(fctDetails.getFACTCODE());
      edpiod.setServiceType(fctDetails.getFACTTYPE());
      edpiod.setExtInfo(fctDetails.getVARIABLEDATA());
      // variable data contains service code and service (base on design 2.0) added on 2013-11-29
      String serviceCode = "";
      if (fctDetails.getVARIABLEDATA() != null ){
        int hIndex = fctDetails.getVARIABLEDATA().indexOf("-");
        if (hIndex != -1){
          serviceCode =fctDetails.getVARIABLEDATA().substring(0,hIndex+1);
        }else if (fctDetails.getVARIABLEDATA().trim().length() == 4){
          serviceCode = fctDetails.getVARIABLEDATA();
        }
      }
     
      edpiod.setServiceCode(serviceCode);

//      result = (EntDbServiceRequest) SerializationUtils
//          .clone(edpiod);
     
      result = edpiod;
View Full Code Here

    protected EntityManager getEntityManager() {
        return _em;
    }
   
    public EntDbServiceRequestX findByPkIdX(String intFlId, String intRefNumber){
        EntDbServiceRequestX result = null;
    
     CriteriaBuilder cb = getEntityManager().getCriteriaBuilder();
     CriteriaQuery cq = cb.createQuery();
     Root<EntDbServiceRequestX> r = cq.from(EntDbServiceRequestX.class);
   //  cq.select(r.get("intId"));
View Full Code Here

TOP

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

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.