Package io.jmix.data.impl.querymacro
Class DateBetweenQueryMacroHandler
java.lang.Object
io.jmix.data.impl.querymacro.AbstractQueryMacroHandler
io.jmix.data.impl.querymacro.DateBetweenQueryMacroHandler
- All Implemented Interfaces:
QueryMacroHandler
@Component("data_DateBetweenQueryMacroHandler")
@Scope("prototype")
public class DateBetweenQueryMacroHandler
extends AbstractQueryMacroHandler
A query macro handler that processes the `@dateBetween` macro. This macro is used to
filter date fields within a specified custom range. The `@dateBetween` macro expects arguments representing a
field name, a start parameter, an end parameter, and an optional time zone.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Patternprotected static final Patternprotected DateTimeTransformationsFields inherited from class io.jmix.data.impl.querymacro.AbstractQueryMacroHandler
count, currentAuthentication, expandedParamTypes, macroPattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected StringreplaceQueryParams(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.voidsetTransformations(DateTimeTransformations transformations) Methods inherited from class io.jmix.data.impl.querymacro.AbstractQueryMacroHandler
expandMacro, getTimeZoneFromArgs, setCurrentAuthentication, setExpandedParamTypes
-
Field Details
-
MACRO_PATTERN
-
QUERY_PARAM_PATTERN
-
transformations
-
macroArgs
-
namedParameters
-
-
Constructor Details
-
DateBetweenQueryMacroHandler
public DateBetweenQueryMacroHandler()
-
-
Method Details
-
setTransformations
-
setQueryParams
Description copied from interface:QueryMacroHandlerSets parameters of the expanded query to the macro handler.- Parameters:
namedParameters- all named parameters of the expanded query
-
doExpand
- Specified by:
doExpandin classAbstractQueryMacroHandler
-
getParams
- Returns:
- all named parameters of the expanded query augmented with the macro parameters
-
getParam
-
replaceQueryParams
Description 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
-