Interface KeyValueMatcherFactory
-
- All Implemented Interfaces:
public interface KeyValueMatcherFactory<KEY extends Object>Defines an interface for creating KeyValueMatcher
-
-
Method Summary
Modifier and Type Method Description abstract KeyValueMatcher<KEY>build(String rule, TypedKeyManager<KEY> keyManager, TypeManagerContext contexts)Similar to build, the only difference is that it should use ComparisonStrategy based on TypeManager.compareTo chosen with respect to the given contexts abstract KeyValueMatcher<KEY>build(String rule, TypedKeyManager<KEY> keyManager, ComparisonStrategy comparison, TypeManagerContext contexts)Generally processing logic looks as below: KeyValueMatcher works on data holders which can be represented as a bag of key-value pairs
Given textual matching rules representations are defined in terms of target keys and their values
We parse the given rule representation string and extract string keys from it in factory-specific way, for example, if it's SQL rule (like
k1 = 1 and (k2 < 2 or k3 in (31, 31)), we can use sql parser for thatFind TypeManager for every value type (see TypeManager.targetType and TypeManager.targetContext), given
contextsallow to customize thatParse value objects from their string representations given in the rule string
Build KeyValueMatcher for the parsed keys, values an operations defined in the given matching rule string. Given ComparisonStrategy is used for that
-
-
Method Detail
-
build
abstract KeyValueMatcher<KEY> build(String rule, TypedKeyManager<KEY> keyManager, TypeManagerContext contexts)
Similar to build, the only difference is that it should use ComparisonStrategy based on TypeManager.compareTo chosen with respect to the given contexts
-
build
abstract KeyValueMatcher<KEY> build(String rule, TypedKeyManager<KEY> keyManager, ComparisonStrategy comparison, TypeManagerContext contexts)
Generally processing logic looks as below:
KeyValueMatcher works on data holders which can be represented as a bag of key-value pairs
Given textual matching rules representations are defined in terms of target keys and their values
We parse the given rule representation string and extract string keys from it in factory-specific way, for example, if it's SQL rule (like
k1 = 1 and (k2 < 2 or k3 in (31, 31)), we can use sql parser for thatFind TypeManager for every value type (see TypeManager.targetType and TypeManager.targetContext), given
contextsallow to customize thatParse value objects from their string representations given in the rule string
Build KeyValueMatcher for the parsed keys, values an operations defined in the given matching rule string. Given ComparisonStrategy is used for that
-
-
-