directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lucas theisen (JIRA)" <>
Subject [jira] [Commented] (DIRAPI-165) Add a FilterBuillder
Date Wed, 28 Jan 2015 19:36:36 GMT


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:
    public static SubstringFilter startswith( String attribute, String init, String... parts
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:
>             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

View raw message