-
Notifications
You must be signed in to change notification settings - Fork 488
Add proximity filter ~= #1052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proximity filter ~= #1052
Conversation
f768265
to
c1c01f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @mkobel! I appreciate this idea; I've left the rest of my feedback inline.
core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/springframework/ldap/filter/ProximityFilter.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/springframework/ldap/query/ConditionCriteria.java
Outdated
Show resolved
Hide resolved
335edd9
to
456efde
Compare
@mkobel, thanks for the quick turnaround! Will you please do the following two polishes to wrap up:
|
Signed-off-by: Moritz Kobel <[email protected]>
456efde
to
b4b2b51
Compare
@jzheaux Thank you for the feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @mkobel! I'll see about adding some additional tests in a polish commit.
I'd like to be a little bit more careful here and not add a default method that throws an UnsupportedOperationException. In the meantime, applications can use the filter method like so: LdapQueryBuilder.query().filter(new ProximityFilter("cn", "John Doe")) PR gh-1052
@mkobel, I'd like to think a little bit longer before adding For now, I've merged the In the meantime, you can do: LdapQueryBuilder.query().filter(new ProximityFilter("cn", "John Doe")) Thanks for the PR, @mkobel, this is now merged into |
Implement proximity filter to allow to create criteria queries like
where("cn").proximity("John")
resulting in a filter like(cn~=John)