Class CompareFilter
java.lang.Object
org.springframework.ldap.filter.AbstractFilter
org.springframework.ldap.filter.CompareFilter
- All Implemented Interfaces:
Filter
- Direct Known Subclasses:
EqualsFilter, GreaterThanOrEqualsFilter, LessThanOrEqualsFilter, ProximityFilter
Abstract superclass for filters that compare values.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCompareFilter(String attribute, int value) Deprecated.CompareFilter(String attribute, String value) Deprecated.please use theprotectedconstructor insteadprotectedCompareFilter(String attribute, String operator, String value, String encodedValue) Construct a filter, specifying the comparisonoperatoras well as the already-encoded value -
Method Summary
Modifier and TypeMethodDescriptionencode(StringBuffer buff) Encodes the filter to a StringBuffer.protected StringencodeValue(String value) Deprecated, for removal: This API element is subject to removal in a future version.please provide the encoded value in the constructorbooleanAll filters must implement equals.protected StringDeprecated, for removal: This API element is subject to removal in a future version.please specify the operator in the constructorinthashCode()All filters must implement hashCode.Methods inherited from class AbstractFilter
encode, toString
-
Constructor Details
-
CompareFilter
Deprecated.please use theprotectedconstructor instead -
CompareFilter
Deprecated.please use theprotectedconstructor insteadConvenience constructor forintvalues.- Parameters:
attribute- Name of attribute in filter.value- The value of the attribute in the filter.
-
CompareFilter
Construct a filter, specifying the comparisonoperatoras well as the already-encoded value- Parameters:
attribute- the attribute nameoperator- the comparison operator; for example,=,~=encodedValue- the already-encoded value- Since:
- 3.3
-
-
Method Details
-
encodeValue
Deprecated, for removal: This API element is subject to removal in a future version.please provide the encoded value in the constructorOverride to perform special encoding in subclass.- Parameters:
value- the value to encode.- Returns:
- properly escaped value.
-
encode
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
-
hashCode
-
getCompareString
Deprecated, for removal: This API element is subject to removal in a future version.please specify the operator in the constructorImplement this method in subclass to return a String representing the operator. TheEqualsFilter.getCompareString()would for example return an equals sign, "=".- Returns:
- the String to use as operator in the comparison for the specific subclass.
-
protectedconstructor instead