Class 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 Detail

      • AbstractOrderingMatchingRuleImpl

        protected AbstractOrderingMatchingRuleImpl​(String indexId)
        Creates an instance of the ordering matching rule.
        Parameters:
        indexId - the identifier of the DB index
    • Method Detail

      • getAssertion

        public final Assertion getAssertion​(Schema schema,
                                            ByteSequence value)
                                     throws DecodeException
        Description copied from interface: MatchingRuleImpl
        Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.
        Parameters:
        schema - The schema in which this matching rule is defined.
        value - The syntax checked assertion value to be normalized.
        Returns:
        The normalized version of the provided assertion value.
        Throws:
        DecodeException - if an syntax error occurred while parsing the value.
      • getGreaterOrEqualAssertion

        public final Assertion getGreaterOrEqualAssertion​(Schema schema,
                                                          ByteSequence value)
                                                   throws DecodeException
        Description copied from interface: MatchingRuleImpl
        Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing greater than or equal matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.
        Parameters:
        schema - The schema in which this matching rule is defined.
        value - The syntax checked assertion value to be normalized.
        Returns:
        The normalized version of the provided assertion value.
        Throws:
        DecodeException - if an syntax error occurred while parsing the value.
      • getLessOrEqualAssertion

        public final Assertion getLessOrEqualAssertion​(Schema schema,
                                                       ByteSequence value)
                                                throws DecodeException
        Description copied from interface: MatchingRuleImpl
        Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than or equal matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.
        Parameters:
        schema - The schema in which this matching rule is defined.
        value - The syntax checked assertion value to be normalized.
        Returns:
        The normalized version of the provided assertion value.
        Throws:
        DecodeException - if an syntax error occurred while parsing the value.
      • createIndexers

        public final Collection<? extends Indexer> createIndexers​(Schema schema,
                                                                  IndexingOptions options)
        Description copied from interface: MatchingRuleImpl
        Returns 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.