Spring LDAP Framework

org.springframework.ldap.filter
Class LikeFilter

java.lang.Object
  extended by org.springframework.ldap.filter.AbstractFilter
      extended by org.springframework.ldap.filter.CompareFilter
          extended by org.springframework.ldap.filter.EqualsFilter
              extended by org.springframework.ldap.filter.LikeFilter
All Implemented Interfaces:
Filter

public class LikeFilter
extends EqualsFilter

This filter allows the user to specify wildcards (*) by not escaping them in the filter. The following code:

 LikeFilter filter = new LikeFilter("cn", "foo*");
 System.out.println(filter.ecode());
 
would result in:
  (cn=foo*)
 

Author:
Anders Henja, Mattias Hellborg Arthursson

Constructor Summary
LikeFilter(String attribute, String value)
           
 
Method Summary
protected  String encodeValue(String value)
          Override to perform special encoding in subclass.
 
Methods inherited from class org.springframework.ldap.filter.EqualsFilter
getCompareString
 
Methods inherited from class org.springframework.ldap.filter.CompareFilter
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

LikeFilter

public LikeFilter(String attribute,
                  String value)
Method Detail

encodeValue

protected String encodeValue(String value)
Description copied from class: CompareFilter
Override to perform special encoding in subclass.

Overrides:
encodeValue in class CompareFilter
Parameters:
value - the value to encode.
Returns:
properly escaped value.

Spring LDAP Framework

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