|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.SearchFilter
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class SearchFilter
This class defines a data structure for storing and interacting with a search filter that may serve as criteria for locating entries in the Directory Server.
Constructor Summary | |
---|---|
SearchFilter(FilterType filterType,
java.util.Collection<SearchFilter> filterComponents,
SearchFilter notComponent,
AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue,
ByteString subInitialElement,
java.util.List<ByteString> subAnyElements,
ByteString subFinalElement,
java.lang.String matchingRuleID,
boolean dnAttributes)
Creates a new search filter with the provided information. |
Method Summary | |
---|---|
static SearchFilter |
createANDFilter(java.util.Collection<SearchFilter> filterComponents)
Creates a new AND search filter with the provided information. |
static SearchFilter |
createApproximateFilter(AttributeType attributeType,
AttributeValue assertionValue)
Creates an approximate search filter with the provided information. |
static SearchFilter |
createApproximateFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue)
Creates an approximate search filter with the provided information. |
static SearchFilter |
createEqualityFilter(AttributeType attributeType,
AttributeValue assertionValue)
Creates a new equality search filter with the provided information. |
static SearchFilter |
createEqualityFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue)
Creates a new equality search filter with the provided information. |
static SearchFilter |
createExtensibleMatchFilter(AttributeType attributeType,
AttributeValue assertionValue,
java.lang.String matchingRuleID,
boolean dnAttributes)
Creates an extensible matching filter with the provided information. |
static SearchFilter |
createExtensibleMatchFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue,
java.lang.String matchingRuleID,
boolean dnAttributes)
Creates an extensible matching filter with the provided information. |
static SearchFilter |
createFilterFromString(java.lang.String filterString)
Decodes the provided filter string as a search filter. |
static SearchFilter |
createGreaterOrEqualFilter(AttributeType attributeType,
AttributeValue assertionValue)
Creates a greater-or-equal search filter with the provided information. |
static SearchFilter |
createGreaterOrEqualFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue)
Creates a greater-or-equal search filter with the provided information. |
static SearchFilter |
createLessOrEqualFilter(AttributeType attributeType,
AttributeValue assertionValue)
Creates a less-or-equal search filter with the provided information. |
static SearchFilter |
createLessOrEqualFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
AttributeValue assertionValue)
Creates a less-or-equal search filter with the provided information. |
static SearchFilter |
createNOTFilter(SearchFilter notComponent)
Creates a new NOT search filter with the provided information. |
static SearchFilter |
createORFilter(java.util.Collection<SearchFilter> filterComponents)
Creates a new OR search filter with the provided information. |
static SearchFilter |
createPresenceFilter(AttributeType attributeType)
Creates a presence search filter with the provided information. |
static SearchFilter |
createPresenceFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions)
Creates a presence search filter with the provided information. |
static SearchFilter |
createSubstringFilter(AttributeType attributeType,
ByteString subInitialElement,
java.util.List<ByteString> subAnyElements,
ByteString subFinalElement)
Creates a new substring search filter with the provided information. |
static SearchFilter |
createSubstringFilter(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions,
ByteString subInitialElement,
java.util.List<ByteString> subAnyElements,
ByteString subFinalElement)
Creates a new substring search filter with the provided information. |
boolean |
equals(java.lang.Object o)
Indicates whether this search filter is equal to the provided object. |
AttributeValue |
getAssertionValue()
Retrieves the assertion value for this filter. |
AttributeType |
getAttributeType()
Retrieves the attribute type for this filter. |
boolean |
getDNAttributes()
Retrieves the dnAttributes flag for this extensible matching filter. |
java.util.Set<SearchFilter> |
getFilterComponents()
Retrieves the set of filter components for this AND or OR filter. |
FilterType |
getFilterType()
Retrieves the filter type for this search filter. |
java.lang.String |
getMatchingRuleID()
Retrieves the matching rule ID for this extensible matching filter. |
SearchFilter |
getNotComponent()
Retrieves the filter component for this NOT filter. |
java.util.List<ByteString> |
getSubAnyElements()
Retrieves the set of subAny elements for this substring filter. |
ByteString |
getSubFinalElement()
Retrieves the subFinal element for this substring filter. |
ByteString |
getSubInitialElement()
Retrieves the subInitial element for this substring filter. |
int |
hashCode()
Retrieves the hash code for this search filter. |
boolean |
matchesEntry(Entry entry)
Indicates whether this search filter matches the provided entry. |
java.lang.String |
toString()
Retrieves a string representation of this search filter. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this search filter to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchFilter(FilterType filterType, java.util.Collection<SearchFilter> filterComponents, SearchFilter notComponent, AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue, ByteString subInitialElement, java.util.List<ByteString> subAnyElements, ByteString subFinalElement, java.lang.String matchingRuleID, boolean dnAttributes)
filterType
- The filter type for this search
filter.filterComponents
- The set of filter components for AND
and OR filters.notComponent
- The filter component for NOT filters.attributeType
- The attribute type for this filter.attributeOptions
- The set of attribute options for the
associated attribute type.assertionValue
- The assertion value for this filter.subInitialElement
- The subInitial element for substring
filters.subAnyElements
- The subAny elements for substring
filters.subFinalElement
- The subFinal element for substring
filters.matchingRuleID
- The matching rule ID for this search
filter.dnAttributes
- Indicates whether to match on DN
attributes for extensible match
filters.
FIXME: this should be private.Method Detail |
---|
public static SearchFilter createANDFilter(java.util.Collection<SearchFilter> filterComponents)
filterComponents
- The set of filter components for the
AND filter.
public static SearchFilter createORFilter(java.util.Collection<SearchFilter> filterComponents)
filterComponents
- The set of filter components for the OR
filter.
public static SearchFilter createNOTFilter(SearchFilter notComponent)
notComponent
- The filter component for this NOT filter.
public static SearchFilter createEqualityFilter(AttributeType attributeType, AttributeValue assertionValue)
attributeType
- The attribute type for this equality
filter.assertionValue
- The assertion value for this equality
filter.
public static SearchFilter createEqualityFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue)
attributeType
- The attribute type for this equality
filter.attributeOptions
- The set of attribute options for this
equality filter.assertionValue
- The assertion value for this equality
filter.
public static SearchFilter createSubstringFilter(AttributeType attributeType, ByteString subInitialElement, java.util.List<ByteString> subAnyElements, ByteString subFinalElement)
attributeType
- The attribute type for this filter.subInitialElement
- The subInitial element for substring
filters.subAnyElements
- The subAny elements for substring
filters.subFinalElement
- The subFinal element for substring
filters.
public static SearchFilter createSubstringFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, ByteString subInitialElement, java.util.List<ByteString> subAnyElements, ByteString subFinalElement)
attributeType
- The attribute type for this filter.attributeOptions
- The set of attribute options for this
search filter.subInitialElement
- The subInitial element for substring
filters.subAnyElements
- The subAny elements for substring
filters.subFinalElement
- The subFinal element for substring
filters.
public static SearchFilter createGreaterOrEqualFilter(AttributeType attributeType, AttributeValue assertionValue)
attributeType
- The attribute type for this
greater-or-equal filter.assertionValue
- The assertion value for this
greater-or-equal filter.
public static SearchFilter createGreaterOrEqualFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue)
attributeType
- The attribute type for this
greater-or-equal filter.attributeOptions
- The set of attribute options for this
search filter.assertionValue
- The assertion value for this
greater-or-equal filter.
public static SearchFilter createLessOrEqualFilter(AttributeType attributeType, AttributeValue assertionValue)
attributeType
- The attribute type for this less-or-equal
filter.assertionValue
- The assertion value for this
less-or-equal filter.
public static SearchFilter createLessOrEqualFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue)
attributeType
- The attribute type for this
less-or-equal filter.attributeOptions
- The set of attribute options for this
search filter.assertionValue
- The assertion value for this
less-or-equal filter.
public static SearchFilter createPresenceFilter(AttributeType attributeType)
attributeType
- The attribute type for this presence
filter.
public static SearchFilter createPresenceFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions)
attributeType
- The attribute type for this presence
filter.attributeOptions
- The attribute options for this presence
filter.
public static SearchFilter createApproximateFilter(AttributeType attributeType, AttributeValue assertionValue)
attributeType
- The attribute type for this approximate
filter.assertionValue
- The assertion value for this approximate
filter.
public static SearchFilter createApproximateFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue)
attributeType
- The attribute type for this approximate
filter.attributeOptions
- The attribute options for this
approximate filter.assertionValue
- The assertion value for this
approximate filter.
public static SearchFilter createExtensibleMatchFilter(AttributeType attributeType, AttributeValue assertionValue, java.lang.String matchingRuleID, boolean dnAttributes) throws DirectoryException
attributeType
- The attribute type for this extensible
match filter.assertionValue
- The assertion value for this extensible
match filter.matchingRuleID
- The matching rule ID for this search
filter.dnAttributes
- Indicates whether to match on DN
attributes for extensible match filters.
DirectoryException
- If the provided information is not
sufficient to create an extensible
match filter.public static SearchFilter createExtensibleMatchFilter(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions, AttributeValue assertionValue, java.lang.String matchingRuleID, boolean dnAttributes) throws DirectoryException
attributeType
- The attribute type for this extensible
match filter.attributeOptions
- The set of attribute options for this
extensible match filter.assertionValue
- The assertion value for this extensible
match filter.matchingRuleID
- The matching rule ID for this search
filter.dnAttributes
- Indicates whether to match on DN
attributes for extensible match
filters.
DirectoryException
- If the provided information is not
sufficient to create an extensible
match filter.public static SearchFilter createFilterFromString(java.lang.String filterString) throws DirectoryException
filterString
- The filter string to be decoded as a search
filter.
DirectoryException
- If a problem occurs while attempting
to decode the provided string as a
search filter.public FilterType getFilterType()
public java.util.Set<SearchFilter> getFilterComponents()
public SearchFilter getNotComponent()
null
if this is not a NOT filter.public AttributeType getAttributeType()
null
if there is none.public AttributeValue getAssertionValue()
null
if there is none.public ByteString getSubInitialElement()
null
if there is none.public java.util.List<ByteString> getSubAnyElements()
public ByteString getSubFinalElement()
public java.lang.String getMatchingRuleID()
public boolean getDNAttributes()
public boolean matchesEntry(Entry entry) throws DirectoryException
entry
- The entry for which to make the determination.
true
if this search filter matches the
provided entry, or false
if it does not.
DirectoryException
- If a problem is encountered during
processing.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provide object is equal to this
search filter, or false
if it is not.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |