Package com.isomorphic.criteria
Class SimpleCriteria
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
com.isomorphic.criteria.SimpleCriteria
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
SimpleCriteria is a format for representing search criteria as simple key-value pairs.
Matching logic depends on textMatchStyle parameter passed into methods.
For more complex logic when different operators should be used or several criteria should be combine by logic operator use AdvancedCriteria
.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
valuesMatchCriteria
(Map values, String textMatchStyle) Check that values in map match current criteria using passed textMatchStyle.
-
Field Details
-
TEXT_MATCH_STYLE_STARTS_WITH
TextMatchStyle for check that actual value should starts with passed value string.- See Also:
-
TEXT_MATCH_STYLE_SUBSTRING
TextMatchStyle for check that actual value contain passed value string.- See Also:
-
-
Constructor Details
-
SimpleCriteria
Construct criteria using key-values pairs.- Parameters:
map
- - map of key-values pairs.
-
-
Method Details
-
valuesMatchCriteria
Check that values in map match current criteria using passed textMatchStyle.- Parameters:
values
- - values to check.textMatchStyle
- - textMatchStyle to use.- Returns:
- if values match criteria.
-