Class GroupByMonthMethod

java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.methods.GroupByMonthMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public class GroupByMonthMethod extends Object implements freemarker.template.TemplateMethodModelEx
groups a sequence of EntityHashModel by a selected month-field and order the groups ascending or descending

usage: groupByMonth(data, "relDonation.receipt_date", "desc") (for asc-ordering, third param isn't needed)

  • Constructor Details

  • Method Details

    • exec

      public Object exec(List arguments) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException