On Tue, Sep 28, 2010 at 2:52 PM, Sergiu Dumitriu <[email protected]> wrote:
I think the name field is a special field, I'd compare it to document display title, I also think that it is reasonable to have the ID and name fields in the User class. In the default implementation it is the concatenation of fname and lname (fallback on ID).
One thing which isn't clear is what exactly is filter? Is it supposed to be a plain string which is extended by the class with %...%, or is it supposed to be a complete thing to send to the storage, including the eventual %? Is it applied on both fname and lname, or on their concatenation?
The proposal is about providing a plain string (need more javadoc), then it's up to the implementation to decorate it if necessary. Side note: the current implementation handles a user cache, the db isn't queried directly, the module iterate over the list of users and perform the matching through String#contains.
Still one unanswered question: what does it match on? doc.fullName, fname || lname, fname + " " + lname, all of them?
It filters on "name", it's up to the implementation to fill that one. In the default implementation it is the concatenation of fname and lname (fallback on ID, which is the document fully qualified named, if none filled). Thanks, JV.