Package org.springframework.ldap.filter
Class OrFilter
java.lang.Object
org.springframework.ldap.filter.AbstractFilter
org.springframework.ldap.filter.BinaryLogicalFilter
org.springframework.ldap.filter.OrFilter
- All Implemented Interfaces:
Filter
Filter for logical OR.
OrFilter filter = new OrFilter();
filter.or(new EqualsFilter("objectclass", "person");
filter.or(new EqualsFilter("objectclass", "organizationalUnit");
System.out.println(filter.encode());
would result in:
(|(objectclass=person)(objectclass=organizationalUnit))-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringImplement this in subclass to return the logical operator, for example "&".Add a query to the OR expressionMethods inherited from class org.springframework.ldap.filter.BinaryLogicalFilter
append, appendAll, encode, equals, hashCodeMethods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
-
Constructor Details
-
OrFilter
public OrFilter()
-
-
Method Details
-
or
Add a query to the OR expression- Parameters:
query- The query to or with the rest of the or:ed queries.- Returns:
- This LdapOrQuery
-
getLogicalOperator
Description copied from class:BinaryLogicalFilterImplement this in subclass to return the logical operator, for example "&".- Specified by:
getLogicalOperatorin classBinaryLogicalFilter- Returns:
- the logical operator.
-