Package org.springframework.ldap.filter
Class NotPresentFilter
- java.lang.Object
-
- org.springframework.ldap.filter.AbstractFilter
-
- org.springframework.ldap.filter.NotPresentFilter
-
- All Implemented Interfaces:
Filter
public class NotPresentFilter extends AbstractFilter
A convenience class that combinesNOTbehavior withpresentbehavior to allow the user to check for the non-existence of a attribute. For an attribute to beNOT presentit must not have any values set. To filter on attributes at arepresentuse thePresentFilter.NotPresentFilter filter = new NotPresentFilter("foo"); System.out.println(filter.encode());would result in:(!(foo=*))
-
-
Constructor Summary
Constructors Constructor Description NotPresentFilter(java.lang.String attribute)Creates a new instance of a not present filter for a particular attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBufferencode(java.lang.StringBuffer buff)Encodes the filter to a StringBuffer.booleanequals(java.lang.Object o)All filters must implement equals.inthashCode()All filters must implement hashCode.-
Methods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
-
-
-
-
Method Detail
-
encode
public java.lang.StringBuffer encode(java.lang.StringBuffer buff)
Description copied from interface:FilterEncodes the filter to a StringBuffer.- Parameters:
buff- The StringBuffer to encode the filter to- Returns:
- The same StringBuffer as was given
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:FilterAll filters must implement equals.
-
-