Package org.forgerock.opendj.ldap
Interface Assertion
-
public interface AssertionA compiled attribute value assertion.
-
-
Field Summary
Fields Modifier and Type Field Description static AssertionUNDEFINED_ASSERTIONAn assertion that always return UNDEFINED for matches and that creates a match all query.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> TcreateIndexQuery(AttributeDescription attributeDescription, IndexQueryFactory<T> factory)Returns an index query appropriate for the provided attribute value assertion.static AssertiongreaterOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)Returns an assertion for greater than or equal comparisons.static AssertiongreaterThanAssertion(String indexId, ByteSequence normalizedAssertionValue)Returns an assertion for greater than comparisons.static AssertionlessOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)Returns an assertion for less than or equal comparisons.static AssertionlessThanAssertion(String indexId, ByteSequence normalizedAssertionValue)Returns an assertion for less than comparisons.ConditionResultmatches(ByteSequence normalizedAttributeValue)Indicates whether the provided attribute value should be considered a match for this assertion value according to the matching rule.default ConditionResultmatchesAny(Set<? extends ByteSequence> normalizedAttributeValues)Indicates whether the provided attribute values should be considered a match for this assertion value according to the matching rule.
-
-
-
Field Detail
-
UNDEFINED_ASSERTION
static final Assertion UNDEFINED_ASSERTION
An assertion that always return UNDEFINED for matches and that creates a match all query.
-
-
Method Detail
-
lessThanAssertion
static Assertion lessThanAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for less than comparisons.- Parameters:
indexId- the index idnormalizedAssertionValue- the normalized assertion value- Returns:
- an assertion for less than comparisons.
-
lessOrEqualAssertion
static Assertion lessOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for less than or equal comparisons.- Parameters:
indexId- the index idnormalizedAssertionValue- the normalized assertion value- Returns:
- an assertion for less than or equal comparisons.
-
greaterOrEqualAssertion
static Assertion greaterOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for greater than or equal comparisons.- Parameters:
indexId- the index idnormalizedAssertionValue- the normalized assertion value- Returns:
- an assertion for greater than or equal comparisons.
-
greaterThanAssertion
static Assertion greaterThanAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for greater than comparisons.- Parameters:
indexId- the index idnormalizedAssertionValue- the normalized assertion value- Returns:
- an assertion for greater than comparisons.
-
matches
ConditionResult matches(ByteSequence normalizedAttributeValue)
Indicates whether the provided attribute value should be considered a match for this assertion value according to the matching rule.- Parameters:
normalizedAttributeValue- The normalized attribute value.- Returns:
TRUEif the attribute value should be considered a match for the provided assertion value,FALSEif it does not match, orUNDEFINEDif the result is undefined.
-
matchesAny
default ConditionResult matchesAny(Set<? extends ByteSequence> normalizedAttributeValues)
Indicates whether the provided attribute values should be considered a match for this assertion value according to the matching rule.- Parameters:
normalizedAttributeValues- The normalized attribute values.- Returns:
TRUEif the attribute value should be considered a match for the provided assertion value,FALSEif it does not match, orUNDEFINEDif the result is undefined.
-
createIndexQuery
<T> T createIndexQuery(AttributeDescription attributeDescription, IndexQueryFactory<T> factory) throws DecodeException
Returns an index query appropriate for the provided attribute value assertion.- Type Parameters:
T- The type of index query created by thefactory.- Parameters:
attributeDescription- The attribute description whose index should be queried.factory- The index query factory which should be used to construct the index query.- Returns:
- The index query appropriate for the provided attribute value assertion.
- Throws:
DecodeException- If an error occurs while generating the index query.
-
-