Package com.ufis_as.ek_if.acts_ods.entities

Examples of com.ufis_as.ek_if.acts_ods.entities.EntDbFltJobSummary


              // Insert the Summary records and update Sum count

              if (totalFltJobSummaryList != null
                  && !totalFltJobSummaryList.isEmpty()) {
                for (String resType : resTypeMap.keySet()) {
                  EntDbFltJobSummary oldSumRec = null;
                  EntDbFltJobSummary summRec = _fltJobSummary
                      .getFltJobSummaryRecByCrewType(idFlight);
                  /*LOG.info("Record found : "
                      + summRec.getTotalAssigned());*/
                  if(summRec!=null){
                  oldSumRec = summRec.getClone();
                  summRec.setTotalAssigned((summRec
                      .getTotalAssigned() + (resTypeMap
                      .get(resType) - crewTypeSum)));
                  summRec.setUpdatedDate(HpUfisCalendar
                      .getCurrentUTCTime());
                  summRec.setUpdatedUser(HpEKConstants.ACTS_DATA_SOURCE);
                  _fltJobSummary
                      .updateFlightJobSummary(summRec);
                  if (HpUfisUtils
                      .isNotEmptyStr(HpCommonConfig.notifyTopic)) {
                    // send notification message to topic
View Full Code Here


  }

  private void populateFltJobSummary(long idFlight, String resTypeCode,
      String resurce_subType, String resource_type, String workType,
      long count, String recStatus, Boolean isLast) {
    EntDbFltJobSummary jobSummary = null;
    try {
      EntDbFltJobSummary fltJobSumRec = new EntDbFltJobSummary();
      fltJobSumRec.setIdFlight(idFlight);
      fltJobSumRec.setResourceType(resource_type);
      fltJobSumRec.setAssignDate(HpUfisCalendar.getCurrentUTCTime()); // ?????
                                      // need
                                      // to
      // clarify...
      fltJobSumRec.setResourceSubtype(resurce_subType);
      fltJobSumRec.setResourceTypeCode(resTypeCode);
      if (!workType.isEmpty()) {
        fltJobSumRec.setStaffWorkType(workType);
      }
      fltJobSumRec.setTotalAssigned(count);
      fltJobSumRec.setRecStatus(" ");
      jobSummary = _fltJobSummary.saveFltJobSummary(fltJobSumRec);
      LOG.info("Inserted record into fltJobSummary successfully");
      if (jobSummary != null) {
        /*
         * sendJobAssignSummUpdateToCedaInJson(jobSummary, null,
View Full Code Here

  }

  @Override
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
  public EntDbFltJobSummary saveFltJobSummary(EntDbFltJobSummary fltJobSummary) {
    EntDbFltJobSummary summryRec = null;
    try {
      summryRec = em.merge(fltJobSummary);
      // em.flush();
    } catch (OptimisticLockException Oexc) {
      // em.flush();
View Full Code Here

  @Override
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
  public EntDbFltJobSummary updateFlightJobSummary(
      EntDbFltJobSummary fltJobSummary) {
    EntDbFltJobSummary summryRec = null;
    try {
      // LOG.debug("Merging the chnages:"+fltJobSummary.getId());
      summryRec = em.merge(fltJobSummary);
      // em.flush();
      // LOG.debug("Merge Successfull");
View Full Code Here

    List<EntDbFltJobSummary> fltSummary =new ArrayList<EntDbFltJobSummary>();
    Query query = em.createNamedQuery("EntDbFltJobSummary.findCrewSumByFlIdCrewType");
    query.setParameter("fltId", id_flight);
    //query.setParameter("resourceTypeCode",null);
    //LOG.info("Query:" + query.toString());
    EntDbFltJobSummary result = null;
    try {
      fltSummary=query.getResultList();
      if(fltSummary!=null && !fltSummary.isEmpty()){
      result =fltSummary .get(0);
      return result;
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.acts_ods.entities.EntDbFltJobSummary

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.