Package org.forgerock.opendj.ldap.schema
Class AbstractOrderingMatchingRuleImpl
- java.lang.Object
-
- org.forgerock.opendj.ldap.schema.AbstractOrderingMatchingRuleImpl
-
- All Implemented Interfaces:
MatchingRuleImpl
public abstract class AbstractOrderingMatchingRuleImpl extends Object
This class implements a default ordering matching rule that matches normalized values in byte order.The getXXXAssertion() methods are default implementations which assume that the assertion syntax is the same as the attribute syntax. Override them if this assumption does not hold true.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOrderingMatchingRuleImpl(String indexId)Creates an instance of the ordering matching rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends Indexer>createIndexers(Schema schema, IndexingOptions options)Returns the indexers for this matching rule.AssertiongetAssertion(Schema schema, ByteString value)Compiles the provided assertion value as anAssertionsuitable for use with equalityMatch, approxMatch and extensibleMatch search filters.AssertiongetOrderingAssertion(Schema schema, ByteString lower, ByteString upper, boolean lowerIncluded, boolean upperIncluded)Compiles the provided ordering assertion value range as anAssertionsuitable for use with ordering search filters, including greaterOrEqual and lessOrEqual.MatchingRule.MatchingRuleTypegetType()Returns the type of this matching rule.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.opendj.ldap.schema.MatchingRuleImpl
getSubstringAssertion, normalizeAttributeValue
-
-
-
-
Constructor Detail
-
AbstractOrderingMatchingRuleImpl
protected AbstractOrderingMatchingRuleImpl(String indexId)
Creates an instance of the ordering matching rule.- Parameters:
indexId- the identifier of the DB index
-
-
Method Detail
-
getType
public MatchingRule.MatchingRuleType getType()
Description copied from interface:MatchingRuleImplReturns the type of this matching rule.- Returns:
- the type of this matching rule.
-
getAssertion
public final Assertion getAssertion(Schema schema, ByteString value) throws DecodeException
Description copied from interface:MatchingRuleImplCompiles the provided assertion value as anAssertionsuitable for use with equalityMatch, approxMatch and extensibleMatch search filters.- Parameters:
schema- The schema in which this matching rule is defined.value- The assertion value.- Returns:
- The compiled assertion.
- Throws:
DecodeException- If the assertion value does not conform to the matching rule's assertion syntax.
-
getOrderingAssertion
public Assertion getOrderingAssertion(Schema schema, ByteString lower, ByteString upper, boolean lowerIncluded, boolean upperIncluded) throws DecodeException
Description copied from interface:MatchingRuleImplCompiles the provided ordering assertion value range as anAssertionsuitable for use with ordering search filters, including greaterOrEqual and lessOrEqual.- Parameters:
schema- The schema in which this matching rule is defined.lower- The lower bound assertion value, ornullif there is no lower bound and the range will start from the smallest key.upper- The upper bound assertion value to be normalized, ornullif there is no upper bound and the range will end at the largest key.lowerIncluded-trueif a key exactly matching the lower bound is included in the range,falseif only keys strictly greater than the lower bound are included. This value is ignored if the lower bound is not specified.upperIncluded-trueif a key exactly matching the upper bound is included in the range,falseif only keys strictly less than the upper bound are included. This value is ignored if the upper bound is not specified.- Returns:
- The compiled ordering assertion.
- Throws:
DecodeException- If the upper or lower bounds do not conform to the matching rule's assertion syntax or if the matching rule does not support ordering matching.
-
createIndexers
public final Collection<? extends Indexer> createIndexers(Schema schema, IndexingOptions options)
Description copied from interface:MatchingRuleImplReturns the indexers for this matching rule.- Parameters:
schema- The schema in which this matching rule is defined.options- The indexing options.- Returns:
- a non null collection of indexers for this matching rule.
-
-