Package org.afekete.moviedatabasecreator.report.Sorter

Examples of org.afekete.moviedatabasecreator.report.Sorter.Sort


      }
  }
   
  public static void exportToFile(List<MovieInfo> result, String fileName) throws JRException, IOException, InterruptedException {
    HashMap<String, Object> params = new HashMap<String, Object>();
    Sort s = getSortType();
    if (s != null) params.put("sorted", ResourceManager.getResourceValue(s.designation()));
    params.put("moviesNum", result.size());
    result = Sorter.sort(result, s);
    List<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>();
    for (int i = 0; i < result.size(); i++) {
      MovieInfo info = result.get(i);
View Full Code Here


      JasperPrint print = getJasperPrint("movieInfo", dataSource, params);
      JasperExportManager.exportReportToPdfFile(print, fileName);
  }
   
  public static Sort getSortType() {
    Sort s = null;
    String sort = ResourceManager.getSettingValue("sort.by");
    if (sort == null) return null;
    if (sort.equalsIgnoreCase(Sort.NAME_HU.designation())) s = Sort.NAME_HU;
    else if (sort.equalsIgnoreCase(Sort.NAME_EN.designation())) s = Sort.NAME_EN;
    else if (sort.equalsIgnoreCase(Sort.DATE.designation())) s = Sort.DATE;
View Full Code Here

TOP

Related Classes of org.afekete.moviedatabasecreator.report.Sorter.Sort

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.