Class MatchedValuesFilter

java.lang.Object
com.unboundid.ldap.sdk.controls.MatchedValuesFilter
All Implemented Interfaces:
Serializable

This class provides an implementation of the simple filter item for use with the MatchedValuesRequestControl as defined in RFC 3876. It is similar to a search filter (see the Filter class), but may only contain a single element (i.e., no AND, OR, or NOT components are allowed), and extensible matching does not allow the use of the dnAttributes field.
See Also:
  • Field Details

  • Method Details

    • createEqualityFilter

      @NotNull public static MatchedValuesFilter createEqualityFilter(@NotNull String attributeType, @NotNull String assertionValue)
      Creates a new matched values filter for equality matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created equality match filter.
    • createEqualityFilter

      @NotNull public static MatchedValuesFilter createEqualityFilter(@NotNull String attributeType, @NotNull byte[] assertionValue)
      Creates a new matched values filter for equality matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created equality match filter.
    • createSubstringFilter

      @NotNull public static MatchedValuesFilter createSubstringFilter(@NotNull String attributeType, @Nullable String subInitialValue, @Nullable String[] subAnyValues, @Nullable String subFinalValue)
      Creates a new matched values filter for substring matching with the provided information. At least one substring filter element must be provided.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      subInitialValue - The subInitial value for the filter, or null if there is no subInitial element.
      subAnyValues - The set of subAny values for the filter, or null if there are no subAny elements.
      subFinalValue - The subFinal value for the filter, or null if there is no subFinal element.
      Returns:
      The created equality match filter.
    • createSubstringFilter

      @NotNull public static MatchedValuesFilter createSubstringFilter(@NotNull String attributeType, @Nullable byte[] subInitialValue, @Nullable byte[][] subAnyValues, @Nullable byte[] subFinalValue)
      Creates a new matched values filter for substring matching with the provided information. At least one substring filter element must be provided.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      subInitialValue - The subInitial value for the filter, or null if there is no subInitial element.
      subAnyValues - The set of subAny values for the filter, or null if there are no subAny elements.
      subFinalValue - The subFinal value for the filter, or null if there is no subFinal element.
      Returns:
      The created equality match filter.
    • createGreaterOrEqualFilter

      @NotNull public static MatchedValuesFilter createGreaterOrEqualFilter(@NotNull String attributeType, @NotNull String assertionValue)
      Creates a new matched values filter for greater-or-equal matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created greater-or-equal match filter.
    • createGreaterOrEqualFilter

      @NotNull public static MatchedValuesFilter createGreaterOrEqualFilter(@NotNull String attributeType, @NotNull byte[] assertionValue)
      Creates a new matched values filter for greater-or-equal matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created greater-or-equal match filter.
    • createLessOrEqualFilter

      @NotNull public static MatchedValuesFilter createLessOrEqualFilter(@NotNull String attributeType, @NotNull String assertionValue)
      Creates a new matched values filter for less-or-equal matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created less-or-equal match filter.
    • createLessOrEqualFilter

      @NotNull public static MatchedValuesFilter createLessOrEqualFilter(@NotNull String attributeType, @NotNull byte[] assertionValue)
      Creates a new matched values filter for less-or-equal matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created less-or-equal match filter.
    • createPresentFilter

      Creates a new matched values filter for presence matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      Returns:
      The created present match filter.
    • createApproximateFilter

      @NotNull public static MatchedValuesFilter createApproximateFilter(@NotNull String attributeType, @NotNull String assertionValue)
      Creates a new matched values filter for approximate matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created approximate match filter.
    • createApproximateFilter

      @NotNull public static MatchedValuesFilter createApproximateFilter(@NotNull String attributeType, @NotNull byte[] assertionValue)
      Creates a new matched values filter for approximate matching with the provided information.
      Parameters:
      attributeType - The attribute type for the filter. It must not be null.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created greater-or-equal match filter.
    • createExtensibleMatchFilter

      @NotNull public static MatchedValuesFilter createExtensibleMatchFilter(@Nullable String attributeType, @Nullable String matchingRuleID, @NotNull String assertionValue)
      Creates a new matched values filter for extensible matching with the provided information. At least one of the attribute type and matching rule ID must be provided.
      Parameters:
      attributeType - The attribute type for the filter, or null if there is no attribute type.
      matchingRuleID - The matching rule ID for the filter, or null if there is no matching rule ID.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created extensible match filter.
    • createExtensibleMatchFilter

      @NotNull public static MatchedValuesFilter createExtensibleMatchFilter(@Nullable String attributeType, @Nullable String matchingRuleID, @NotNull byte[] assertionValue)
      Creates a new matched values filter for extensible matching with the provided information. At least one of the attribute type and matching rule ID must be provided.
      Parameters:
      attributeType - The attribute type for the filter, or null if there is no attribute type.
      matchingRuleID - The matching rule ID for the filter, or null if there is no matching rule ID.
      assertionValue - The assertion value for the filter. It must not be null.
      Returns:
      The created extensible match filter.
    • create

      Creates a new matched values filter from the provided search filter, if possible.
      Parameters:
      filter - The search filter to use to create this matched values filter.
      Returns:
      The search filter that corresponds to this matched values filter.
      Throws:
      LDAPException - If the provided search filter cannot be represented as a matched values filter.
    • getMatchType

      public byte getMatchType()
      Retrieves the match type for this matched values filter.
      Returns:
      The match type for this matched values filter.
    • getAttributeType

      Retrieves the name of the attribute type for this matched values filter, if available.
      Returns:
      The name of the attribute type for this matched values filter, or null if there is none.
    • getAssertionValue

      Retrieves the string representation of the assertion value for this matched values filter, if available.
      Returns:
      The string representation of the assertion value for this matched values filter, or null if there is none.
    • getAssertionValueBytes

      Retrieves the binary representation of the assertion value for this matched values filter, if available.
      Returns:
      The binary representation of the assertion value for this matched values filter, or null if there is none.
    • getRawAssertionValue

      Retrieves raw assertion value for this matched values filter, if available.
      Returns:
      The raw assertion value for this matched values filter, or null if there is none.
    • getSubInitialValue

      Retrieves the string representation of the subInitial element for this matched values filter, if available.
      Returns:
      The string representation of the subInitial element for this matched values filter, or null if there is none.
    • getSubInitialValueBytes

      Retrieves the binary representation of the subInitial element for this matched values filter, if available.
      Returns:
      The binary representation of the subInitial element for this matched values filter, or null if there is none.
    • getRawSubInitialValue

      Retrieves the raw subInitial element for this matched values filter, if available.
      Returns:
      The raw subInitial element for this matched values filter, or null if there is none.
    • getSubAnyValues

      Retrieves the string representations of the subAny elements for this matched values filter, if available.
      Returns:
      The string representations of the subAny element for this matched values filter, or an empty array if there are none.
    • getSubAnyValueBytes

      @NotNull public byte[][] getSubAnyValueBytes()
      Retrieves the binary representations of the subAny elements for this matched values filter, if available.
      Returns:
      The binary representations of the subAny element for this matched values filter, or an empty array if there are none.
    • getRawSubAnyValues

      Retrieves the raw subAny elements for this matched values filter, if available.
      Returns:
      The raw subAny element for this matched values filter, or an empty array if there are none.
    • getSubFinalValue

      Retrieves the string representation of the subFinal element for this matched values filter, if available.
      Returns:
      The string representation of the subFinal element for this matched values filter, or null if there is none.
    • getSubFinalValueBytes

      Retrieves the binary representation of the subFinal element for this matched values filter, if available.
      Returns:
      The binary representation of the subFinal element for this matched values filter, or null if there is none.
    • getRawSubFinalValue

      Retrieves the raw subFinal element for this matched values filter, if available.
      Returns:
      The raw subFinal element for this matched values filter, or null if there is none.
    • getMatchingRuleID

      Retrieves the matching rule ID for this matched values filter, if available.
      Returns:
      The matching rule ID for this matched values filter, or null if there is none.
    • encode

      Encodes this matched values filter for use in the matched values control.
      Returns:
      The ASN.1 element containing the encoded representation of this matched values filter.
    • decode

      Decodes the provided ASN.1 element as a matched values filter.
      Parameters:
      element - The ASN.1 element to decode as a matched values filter.
      Returns:
      The decoded matched values filter.
      Throws:
      LDAPException - If the provided ASN.1 element cannot be decoded as a matched values filter.
    • toFilter

      Creates a search filter that is the equivalent of this matched values filter.
      Returns:
      A search filter that is the equivalent of this matched values filter.
    • toString

      Retrieves a string representation of this matched values filter.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this matched values filter.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this matched values filter to the provided buffer.
      Parameters:
      buffer - The buffer to which to append the string representation of this matched values filter.