Examples of WageDTO


Examples of com.cin.dto.WageDTO

        "SELECT w from Wage w");
   
    List<?> result = query.getResultList();
    List<WageDTO> dtoList = new ArrayList<WageDTO>( result.size() );
    for(Object ejb : result){
      dtoList.add(new WageDTO((Wage) ejb));
    }
    return dtoList;
  }
View Full Code Here

Examples of com.cin.dto.WageDTO

    //staticDataService.updateMeanWeekWage();
  }

  @Test
  public void testUpdateMeanWeekWageWithCode() {
    WageDTO aDTO = new WageDTO();
    aDTO.setIndustryCode(9);
    aDTO.setOccupationCode(1);
    staticDataService.updateMeanWeekWage(aDTO);
    assertTrue(aDTO.getMeanWeekWage() > 0);
  }
View Full Code Here

Examples of com.cin.dto.WageDTO

          Object object = objectMessage.getObject();
          if( object == null ){
           
                aService.updateMeanWeekWage();
          } else {
            WageDTO aWage = (WageDTO) object;
            aService.updateMeanWeekWage( aWage );
          }
    }
        catch (JMSException pException) {
      EventLogger.getInstance().log(Level.SEVERE, pException.getMessage());
View Full Code Here

Examples of com.cin.dto.WageDTO

  }
 
  public void updateMeanWeekWage(){
    List<WageDTO> theWages = aRemote.findAllWageDetails();
    CensusInsuranceService aService = new CensusInsuranceService();
    WageDTO aWageDTO = new WageDTO();
    for(WageDTO aWage : theWages) {
     
     
      int anOccupationCode = aWage.getOccupationCode();
      int anIndustryCode = aWage.getIndustryCode();
      List<UserDTO> theUsers = aService.findUsersByCode(anIndustryCode,anOccupationCode);
     
      if(theUsers != null && !theUsers.isEmpty()) {
       
        aWageDTO.setMeanWeekWage(this.calculateMeanWeekWage(theUsers));
        aWageDTO.setIndustryCode(anIndustryCode);
        aWageDTO.setOccupationCode(anOccupationCode);
        aRemote.setMeanWage(aWageDTO);
      }
    }
   
    EventLogger.getInstance().info("All wage details updated");
View Full Code Here

Examples of com.cin.dto.WageDTO

   
    CensusInsuranceService aService = new CensusInsuranceService();
    List<UserDTO> theUsers = aService.findUsersByCode(industryCode, occupationCode);
    int meanWage = calculateMeanWeekWage( theUsers );
   
    WageDTO newWage = new WageDTO();
    newWage.setIndustryCode(industryCode);
    newWage.setOccupationCode(occupationCode);
    newWage.setMeanWeekWage(meanWage);
   
    aRemote.setMeanWage(newWage);
   
    return newWage.getMeanWeekWage();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.