[ 
https://issues.apache.org/jira/browse/DIRAPI-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14295306#comment-14295306
 ] 

lucas theisen commented on DIRAPI-165:
--------------------------------------

{quote}Your proposal is interesting, but you have some missing use cases (I = 
initial, A = any, F = final) :{quote}
This should cover it all:
{quote}*    I'*' -> startsWith{quote}
{code}startsWith("givenName", "emm"); // emm*{code}
{quote}*    '*'F -> endsWith{quote}
{code}endsWith("givenName", "uel"); // *uel{code}
{quote}*    ''(A'')+ -> contains{quote}
{code}contains("givenName", "man", "e"); // *man*e*{code}
{quote}*    I''(A'')+ -> ???{quote}
{code}startsWith("givenName", "emm", "n"); // emm*n*{code}
{quote}*    I'*'F -> ???{quote}
{code}substring("givenName", "emm", "l"); // emm*l{code}
{quote}*    ''(A'')+F -> ???{quote}
{code}endsWith("givenName", "n", "l"); // *n*l{code}
{quote}*    I''(A'')+F -> substring{quote}
{code}substring("givenName", "emm", "n", "l" ); // emm*n*l{code}
All the methods would have {{String... parts}}...

> Add a FilterBuillder
> --------------------
>
>                 Key: DIRAPI-165
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-165
>             Project: Directory Client API
>          Issue Type: New Feature
>    Affects Versions: 1.0.0-M21
>            Reporter: lucas theisen
>            Priority: Minor
>             Fix For: 1.0.0-M29
>
>
> Looking for something Fluent, in the _spirit_ of Hibernate Criteria.  May not 
> seem like much, but can drastically reduce query syntax issues. Also, you 
> would likely be using a StringBuilder anyway, so its not much different. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to