Package jp.sf.amateras.stepcounter

Examples of jp.sf.amateras.stepcounter.CategoryStepDto


  public byte[] format(CountResult[] result) {
    try {
      InputStream in = ExcelFormatter.class.getResourceAsStream("ExcelFormatter.xls");

      List<CategoryStepDto> categories = new ArrayList<CategoryStepDto>();
      CategoryStepDto nonCategory = new CategoryStepDto();
      nonCategory.setCategory("");
      boolean useNonCategory = false;
      for (CountResult resultDto : result) {
        CategoryStepDto categoryDto = null;
        if (resultDto.getCategory() == null || "".equals(resultDto.getCategory())) {
          categoryDto = nonCategory;
          useNonCategory = true;
        } else {
          categoryDto = getCategoryDto(categories, resultDto.getCategory());
        }
        categoryDto.setStep(categoryDto.getStep() + resultDto.getStep());
        categoryDto.setNone(categoryDto.getNone() + resultDto.getNon());
        categoryDto.setComment(categoryDto.getComment() + resultDto.getComment());
      }
      if (useNonCategory) {
        categories.add(nonCategory);
      }
View Full Code Here


      if (categoryDto.getCategory().equals(category)) {
        return categoryDto;
      }
    }

    CategoryStepDto categoryDto = new CategoryStepDto();
    categoryDto.setCategory(category);
    categoryResult.add(categoryDto);

    return categoryDto;
  }
View Full Code Here

TOP

Related Classes of jp.sf.amateras.stepcounter.CategoryStepDto

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.