Package io.jmix.data.impl.querymacro
Class TimeBetweenQueryMacroHandler
java.lang.Object
io.jmix.data.impl.querymacro.AbstractQueryMacroHandler
io.jmix.data.impl.querymacro.TimeBetweenQueryMacroHandler
- All Implemented Interfaces:
- QueryMacroHandler
@Component("data_TimeBetweenQueryMacroHandler")
@Scope("prototype")
public class TimeBetweenQueryMacroHandler
extends AbstractQueryMacroHandler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Patternprotected List<MacroArgsTimeBetween>protected static final Patternprotected static final Patternprotected TimeSourceprotected DateTimeTransformationsprotected static final Map<String,BiFunction<ZonedDateTime, Integer, ZonedDateTime>> Fields inherited from class io.jmix.data.impl.querymacro.AbstractQueryMacroHandlercount, currentAuthentication, expandedParamTypes, macroPattern
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected Stringprotected Stringprotected StringreplaceParamsInMacros(String macros, Map<String, Object> params) replaceQueryParams(String queryString, Map<String, Object> params) Replaces param names inqueryStringwith its values from theparamsparameter.voidsetQueryParams(Map<String, Object> namedParameters) Sets parameters of the expanded query to the macro handler.Methods inherited from class io.jmix.data.impl.querymacro.AbstractQueryMacroHandlerexpandMacro, getTimeZoneFromArgs, setCurrentAuthentication, setExpandedParamTypes
- 
Field Details- 
MACRO_PATTERN
- 
PARAM_PATTERN
- 
QUERY_PARAM_PATTERN
- 
UNITS
- 
transformations
- 
timeSource
- 
macroArgs
 
- 
- 
Constructor Details- 
TimeBetweenQueryMacroHandlerpublic TimeBetweenQueryMacroHandler()
 
- 
- 
Method Details- 
setQueryParamsDescription copied from interface:QueryMacroHandlerSets parameters of the expanded query to the macro handler.- Parameters:
- namedParameters- all named parameters of the expanded query
 
- 
replaceQueryParamsDescription copied from interface:QueryMacroHandlerReplaces param names inqueryStringwith its values from theparamsparameter. If macro is not found, the source query string is returned.- Returns:
- modified query string
 
- 
replaceParamsInMacros
- 
doExpand- Specified by:
- doExpandin class- AbstractQueryMacroHandler
 
- 
getParams- Returns:
- all named parameters of the expanded query augmented with the macro parameters
 
- 
getParam
 
-