Package com.ufis_as.ek_if.opera.entities

Examples of com.ufis_as.ek_if.opera.entities.EntDbPaxLoungeMove


    public DlPaxLoungeMoveBean() {
      super(EntDbPaxLoungeMove.class);
    }
   
    public EntDbPaxLoungeMove merge(EntDbPaxLoungeMove entity){
      EntDbPaxLoungeMove loungeMove = null;
      try{
        loungeMove = em.merge(entity);
      }
      catch(Exception ex){
        LOG.error("ERROR to create new pax lounge move!!! {}", ex.toString());
View Full Code Here


      return loungeMove;
    }
   
    public EntDbPaxLoungeMove getPaxLoungeMove(String paxRefNum, BigDecimal id_Flight){
      List<EntDbPaxLoungeMove> resultList = null;
      EntDbPaxLoungeMove result = null;
     
      Query query = getEntityManager().createNamedQuery("EntDbPaxLoungeMove.getByPaxRegnKey");
      try{
        query.setParameter("paxRegnKey", paxRefNum);
        query.setParameter("id_Flight", id_Flight);
        resultList = query.getResultList();
        if(resultList.size()>0){
          result = resultList.get(0);
          LOG.debug("Pax lounge move is found. ID : {}", result.getId());
        }
        else
          LOG.debug("Pax lounge move is not found.");
      }
      catch(Exception ex){
View Full Code Here

      if(_input.getAudit().getScanTime() != null){
        scanTime = convertFlDateToUTC_Lounge(_input.getAudit().getScanTime());
        scanTimeUTC = new HpUfisCalendar(scanTime).getTime();
      }
     
      EntDbPaxLoungeMove oldEnt = null; String cmd = UfisASCommands.IRT.name();
      //find existing pax lounge move only if the flight is not null.
      EntDbPaxLoungeMove entPaxLoungeMove = clsDlPaxLoungeMoveBean.getPaxLoungeMove(_input.getPaxDetails().getRegKey(), urno);
      if(entPaxLoungeMove == null){
        entPaxLoungeMove = new EntDbPaxLoungeMove();
        entPaxLoungeMove.setCreatedUser(HpEKConstants.OPERA_SOURCE);
        entPaxLoungeMove.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
      }
      else{
        oldEnt = new EntDbPaxLoungeMove(entPaxLoungeMove);
        entPaxLoungeMove.setUpdatedUser(HpEKConstants.OPERA_SOURCE);
        entPaxLoungeMove.setUpdatedDate(HpUfisCalendar.getCurrentUTCTime());
        cmd = UfisASCommands.URT.name();
      }
      entPaxLoungeMove.setPaxRegnKey(_input.getPaxDetails().getRegKey());
      entPaxLoungeMove.setIdFlight(urno);
      entPaxLoungeMove.setIdLoadPax(id_load_pax);
      entPaxLoungeMove.setIdMdLoungeCode(id_md_lounge_code);
      if(_input.getMeta().getMessageTime() != null)
        entPaxLoungeMove.setMsgSentDate(new HpUfisCalendar(
            _input.getMeta().getMessageTime().toGregorianCalendar().getTime()).getTime());
     
      entPaxLoungeMove.setMsgId(new BigDecimal(_input.getMeta().getMessageID()));
      entPaxLoungeMove.setFlightNumber(ffltNo);
      entPaxLoungeMove.setDepNum((_input.getFlightID().getDepNo()== null)? null : String.valueOf(_input.getFlightID().getDepNo()));
      entPaxLoungeMove.setFltDate(_input.getFlightID().getFltDate().toGregorianCalendar().getTime());
      entPaxLoungeMove.setFltOrigin3(_input.getFlightID().getDepStn());
      entPaxLoungeMove.setFltDest3(_input.getFlightID().getArrStn());
      entPaxLoungeMove.setLegNum(String.valueOf(_input.getFlightID().getLegNo()));
     
      entPaxLoungeMove.setPaxRefNum(_input.getPaxDetails().getSeqNo());
      entPaxLoungeMove.setPaxNameRec(_input.getPaxDetails().getPNR());
      entPaxLoungeMove.setPaxName(_input.getPaxDetails().getPaxName());
      entPaxLoungeMove.setPaxFreqFlyerId(_input.getPaxDetails().getPaxFFID());
      entPaxLoungeMove.setPaxFreqFlyerTier(_input.getPaxDetails().getPaxFFTier());
      entPaxLoungeMove.setScanLoungeDate(scanTimeUTC);
      entPaxLoungeMove.setEnterExitFlag(_input.getPaxDetails().getStatus());
      entPaxLoungeMove.setLoungeCode(_input.getPaxDetails().getLoungeCode());
      entPaxLoungeMove.setLoungeClass(_input.getPaxDetails().getLoungeClass());
      entPaxLoungeMove.setGuestFlag(_input.getPaxDetails().getGuestFlag());
      entPaxLoungeMove.setGuestMapkey(_input.getPaxDetails().getGuestMapKey());
      entPaxLoungeMove.setScanUser(_input.getAudit().getScanBy());
      //merge the entity input data
      EntDbPaxLoungeMove entPaxLoungeMoveResult = clsDlPaxLoungeMoveBean.merge(entPaxLoungeMove);
      if(entPaxLoungeMoveResult != null)
        sendNotifyUldInfoToInJson(entPaxLoungeMoveResult, oldEnt, cmd);
    } catch (JAXBException e) {
      LOG.error("JAXBContext when unmarshalling... {}", e.getMessage());
      addExptInfo(EnumExceptionCodes.EXSDF.name(), "");
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.opera.entities.EntDbPaxLoungeMove

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.