22.214.171.124 - MatchingRules¶
A MatchingRule is used when processing search requests using Filters, or a Compare or during Modify operations. An AttributeType defines up to 3 types of MatchingRules:
- EQUALITY : for comparisons for equality
- ORDERING : for comparisons involving the <= or >= operators
- SUBSTR : for comparisons involving substrings, like 'xyz' or 'xz'
There are a few extra parameters that are defined in the MatchingRule class:
- getSyntax() : gets the Syntax instance associated with the MatchingRule
- getSyntaxOid() : gets the Syntax OID associated with the MatchingRule
We also have 2 specific methods that are used to compare or normalize a value:
- getLdapComparator() : gets the LdapComparator to use to compare 2 values
- getNormalizer() : gets the Normalizer used to normalize a value
Those are convenient methods, specifically when you need to compare two values.
A MatchingRule instance is associated with a LdapSyntax and a Normalizer because it may need to get information about the attribute value check and normalization. It also contains a reference to the associated LdapComparator.