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

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

I would probably throw an {{IllegalArgumentException}} in the empty array case. 
 What you have is _nicer_ but if they really did provide an empty list to a 
{{startsWith}, its a REALLY good chance they made a mistake.  You could enforce 
it compile time with a:
{code}
    public static SubstringFilter startswith( String attribute, String init, 
String... parts )
{code}
but I would not do that because there would be no way to ensure this for 
{{endsWith}} and I like the idea of all of them having the same argument list.  
I think fail fast with the exception would be best.  Finally, you probably 
meant to camelCase {{startsWith}}...

> 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