Package org.forgerock.opendj.ldap
Interface Assertion
-
public interface Assertion
A compiled attribute value assertion.
-
-
Field Summary
Fields Modifier and Type Field Description static Assertion
UNDEFINED_ASSERTION
An 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> T
createIndexQuery(AttributeDescription attributeDescription, IndexQueryFactory<T> factory)
Returns an index query appropriate for the provided attribute value assertion.static Assertion
greaterOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for greater than or equal comparisons.static Assertion
greaterThanAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for greater than comparisons.static Assertion
lessOrEqualAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for less than or equal comparisons.static Assertion
lessThanAssertion(String indexId, ByteSequence normalizedAssertionValue)
Returns an assertion for less than comparisons.ConditionResult
matches(ByteSequence normalizedAttributeValue)
Indicates whether the provided attribute value should be considered a match for this assertion value according to the matching rule.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.
-
-
-
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:
TRUE
if the attribute value should be considered a match for the provided assertion value,FALSE
if it does not match, orUNDEFINED
if 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:
TRUE
if the attribute value should be considered a match for the provided assertion value,FALSE
if it does not match, orUNDEFINED
if 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.
-
-