Package com.ufis_as.ek_if.macs.entities

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


        return _em;
    }
   
   
    public EntDbServiceRequest findByPkId(String intId, String system){
      EntDbServiceRequest entDbPaxServiceRequest = null;
    try {
      Query query = getEntityManager().createNamedQuery("EntDbServiceRequest.findByPk");
      query.setParameter("intId", intId);
      query.setParameter("intSystem", system);
     
View Full Code Here


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

    }
    return uuid;
    }
   
    public EntDbServiceRequest findByIdFlightAndPaxRefNum(int idFlight, String intRefNumber){
      EntDbServiceRequest entDbPaxServiceRequest = null;
    try {
      Query query = getEntityManager().createNamedQuery("EntDbServiceRequest.findByIdFlightAndPaxRefNum");
      query.setParameter("idFlight", idFlight);
      query.setParameter("intRefNumber", intRefNumber);
     
View Full Code Here

//    }
    return result;
  }

  public EntDbServiceRequest readStorePax(FctDetails fctDetails, long irmtabRef) {
    EntDbServiceRequest result = null;

    if (fctDetails != null) {
     
      logLevel = entStartupInitSingleton.getIrmLogLev();
       
        msgLogged = Boolean.FALSE;
        if (irmtabRef > 0) {
          msgLogged = Boolean.TRUE;
        }
     
      EntDbServiceRequest edpiod = new EntDbServiceRequest();
      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,irmtabRef);
         return null;
      }

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

      // check as it's a mandatory field
      if (fctDetails.getREFERENCENUMBER() != null
          && !fctDetails.getREFERENCENUMBER().isEmpty()) {
//        edpiod.setIntRefNumber(fctDetails.getREFERENCENUMBER());
        serviceRequestPK.setIntRefNumber(fctDetails.getREFERENCENUMBER());
      } else {
        LOG.info("Mandatory field REFERENCENUMBER is null or empty, Fact Message is rejected");
        sendErroNotification(EnumExceptionCodes.EMAND,irmtabRef);
         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

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

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

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

      // update serviceRequest
      Class<EntDbServiceRequest> entDbServiceRequestClass = EntDbServiceRequest.class;
      Field[] entDbServiceRequestFields = entDbServiceRequestClass
View Full Code Here

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

TOP

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

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.