Package org.springframework.ldap.filter
Class PresentFilter
- java.lang.Object
-
- org.springframework.ldap.filter.AbstractFilter
-
- org.springframework.ldap.filter.PresentFilter
-
- All Implemented Interfaces:
Filter
public class PresentFilter extends AbstractFilter
Filter that allows the user to check for the existence of a attribute. For an attribute to be'present'it must contain a value. Attributes that do not contain a value are'NOT present'. To filter on attributes that are'NOT present'use theNotPresentFilteror use this filter in combination with aNotFilter.PresentFilter filter = new PresentFilter("foo"); System.out.println(filter.encode());would result in:(foo=*)
-
-
Constructor Summary
Constructors Constructor Description PresentFilter(java.lang.String attribute)Creates a new instance of a 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.
-
-