On 6 February 2013 02:16, Kevin Meyer <[email protected]> wrote:

> Hi Dan,
>
>

>
> So, sure, I guess I can look into enhancing QueryAbstract with optional
> parameters.
>
+1

How about a new withPaging(start, count) method, eg:

public class QueryAbstract {

    ...
    public QueryAbstract withPaging(int start, int count) {
        this.start = start;
        this.count = count;
        return this;
   }

}


>
> Does anyone have anything to add regarding method signature? Start and
> count vs start and end, for example? I think start and cound is more
> obvious (and couples with the paging annotation).
>

I'm happy with those names (rather than start/end)


>
> As for your other question: I used "find by pattern" quite nicely in my
> deployed app, so I'd like to see it preserved. Find by title is a simple
> specific implementation of pattern, but could be useful... dunno.
>
> OK, thx.  The thing about search by title is that - to be efficient - it
requires that the objectstore has persisted the title in a column
somewhere.   I'd rather that the programmer decides to do this explicitly
(eg by having a hidden property that holds the title and search on that)
than have the framework do some magic.

ie, if the programmer really wants to support search by title, they can
just do:

public class ToDoItem {


    @Title
    @Hidden
    public String getTitle() { ... }
    public void setTitle(String t) { ... }

    private void recomputeTitle() {   // call whenever a component part of
title has changed
        setTitle(....);
    }

}

Dan

Regards,
> Kevin
>
>

Reply via email to