org.springframework.ldap.support.filter
Class LikeFilter

java.lang.Object
  extended byorg.springframework.ldap.support.filter.AbstractFilter
      extended byorg.springframework.ldap.support.filter.CompareFilter
          extended byorg.springframework.ldap.support.filter.EqualsFilter
              extended byorg.springframework.ldap.support.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 Arthursson

Constructor Summary
LikeFilter(java.lang.String attribute, java.lang.String value)
           
 
Method Summary
protected  java.lang.String encodeValue(java.lang.String value)
          Encodes a value according to the rules for this filter.
 
Methods inherited from class org.springframework.ldap.support.filter.EqualsFilter
getCompareString
 
Methods inherited from class org.springframework.ldap.support.filter.CompareFilter
encode, equals, hashCode
 
Methods inherited from class org.springframework.ldap.support.filter.AbstractFilter
encode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LikeFilter

public LikeFilter(java.lang.String attribute,
                  java.lang.String value)
Method Detail

encodeValue

protected java.lang.String encodeValue(java.lang.String value)
Encodes a value according to the rules for this filter.

Overrides:
encodeValue in class CompareFilter
Parameters:
value - Value to encode.
Returns:
Encoded value.


Copyright � 2002-2006. All Rights Reserved.