Spring LDAP Framework

org.springframework.ldap.filter
Class AndFilter

java.lang.Object
  extended by org.springframework.ldap.filter.AbstractFilter
      extended by org.springframework.ldap.filter.BinaryLogicalFilter
          extended by org.springframework.ldap.filter.AndFilter
All Implemented Interfaces:
Filter

public class AndFilter
extends BinaryLogicalFilter

A filter for a logical AND. Example:

     AndFilter filter = new AndFilter();
     filter.and(new EqualsFilter("objectclass", "person");
     filter.and(new EqualsFilter("cn", "Some CN");
     System.out.println(filter.encode());    
 
would result in: (&(objectclass=person)(cn=Some CN))

Author:
Adam Skogman, Mattias Hellborg Arthursson
See Also:
EqualsFilter

Field Summary
 
Fields inherited from class org.springframework.ldap.filter.BinaryLogicalFilter
queryList
 
Constructor Summary
AndFilter()
           
 
Method Summary
 AndFilter and(Filter query)
          Add a query to the AND expression.
protected  String getLogicalOperator()
          Implement this in subclass to return the logical operator, for example &qout;&&qout;.
 
Methods inherited from class org.springframework.ldap.filter.BinaryLogicalFilter
append, encode, equals, hashCode
 
Methods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AndFilter

public AndFilter()
Method Detail

getLogicalOperator

protected String getLogicalOperator()
Description copied from class: BinaryLogicalFilter
Implement this in subclass to return the logical operator, for example &qout;&&qout;.

Specified by:
getLogicalOperator in class BinaryLogicalFilter
Returns:
the logical operator.

and

public AndFilter and(Filter query)
Add a query to the AND expression.

Parameters:
query - The expression to AND with the rest of the AND:ed expressions.
Returns:
This LdapAndQuery

Spring LDAP Framework

Copyright © 2005-2010 The Spring LDAP Framework. All Rights Reserved.