Class AttributeFilterParameter<T>
java.lang.Object
com.loop54.model.request.parameters.filters.FilterParameter
com.loop54.model.request.parameters.filters.AttributeFilterParameter<T>
- Type Parameters:
T- The type of the entity that we want to filter.
Used for filtering entities that have a certain attribute value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe name of attribute to filter on.How to compare the attribute value against the provided value.final FilterParameterTypeType of the filter.The value to test the attributes values against. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeFilterParameter(FilterParameterType type, T value) AttributeFilterParameter(String attributeName, T value) Constructor. -
Method Summary
-
Field Details
-
type
Type of the filter. If the type of the filter isFilterParameterType.ATTRIBUTE, the name of the attribute needs to be specified in theattributeNamefield. -
attributeName
The name of attribute to filter on. This must be set iftypeisFilterParameterType.ATTRIBUTE. -
value
The value to test the attributes values against. -
comparisonMode
How to compare the attribute value against the provided value. Defaults toFilterComparisonMode.EQUALS.
-
-
Constructor Details
-
AttributeFilterParameter
- Parameters:
type- Type of the filter. If you want to useFilterParameterType.ATTRIBUTEit's easier to use theAttributeFilterParameter(String, Object)constructor.value- The value to compare.
-
AttributeFilterParameter
Constructor. Use this if you want to use the filter parameter to filter on an attribute. Will set the type of the filter toFilterParameterType.ATTRIBUTE.- Parameters:
attributeName- Name of the attribute to filter on. For instance "category". Note that the names of the attributes vary depending on setup.value- The value to compare. For instance a category name if filtering on a category attribute.
-