Class DateBeforeMacroHandler

java.lang.Object
io.jmix.data.impl.querymacro.AbstractQueryMacroHandler
io.jmix.data.impl.querymacro.DateBeforeMacroHandler
All Implemented Interfaces:
QueryMacroHandler

@Component("data_DateBeforeQueryMacroHandler") @Scope("prototype") public class DateBeforeMacroHandler extends AbstractQueryMacroHandler
  • Field Details

    • MACRO_PATTERN

      protected static final Pattern MACRO_PATTERN
    • NOW_PARAM_PATTERN

      protected static final Pattern NOW_PARAM_PATTERN
    • transformations

      @Autowired protected DateTimeTransformations transformations
    • timeSource

      @Autowired protected TimeSource timeSource
    • namedParameters

      protected Map<String,Object> namedParameters
    • paramArgs

      protected List<MacroArgs> paramArgs
  • Constructor Details

    • DateBeforeMacroHandler

      public DateBeforeMacroHandler()
  • Method Details

    • doExpand

      protected String doExpand(String macro)
      Specified by:
      doExpand in class AbstractQueryMacroHandler
    • setQueryParams

      public void setQueryParams(Map<String,Object> namedParameters)
      Description copied from interface: QueryMacroHandler
      Sets parameters of the expanded query to the macro handler.
      Parameters:
      namedParameters - all named parameters of the expanded query
    • getParams

      public Map<String,Object> getParams()
      Returns:
      all named parameters of the expanded query augmented with the macro parameters
    • replaceQueryParams

      public String replaceQueryParams(String queryString, Map<String,Object> params)
      Description copied from interface: QueryMacroHandler
      Replaces param names in queryString with its values from the params parameter. If macro is not found, the source query string is returned.
      Returns:
      modified query string