| Title: 4.2.1.4 - MatchingRules |
| NavPrev: 4.2.1.3-syntaxes.html |
| NavPrevText: 4.2.1.3 - Syntaxes |
| NavUp: 4.2.1-schema-objects.html |
| NavUpText: 4.2.1 - Schema Objects |
| NavNext: 4.2.1.5-dit-content-rules.html |
| NavNextText: 4.2.1.5 - DITContentRules |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| . |
| http://www.apache.org/licenses/LICENSE-2.0 |
| . |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| # 4.2.1.4 - MatchingRules |
| |
| A **MatchingRule** is used when processing search requests using **Filter**s, or a **Compare** or during **Modify** operations. An **AttributeType** defines up to 3 types of **MatchingRule**s: |
| |
| * EQUALITY : for comparisons for equality |
| * ORDERING : for comparisons involving the <= or >= operators |
| * SUBSTR : for comparisons involving substrings, like '*xyz' or 'x*z' |
| |
| 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**. |