On 26 August 2011 18:03, Franklin, Matthew B. <[email protected]> wrote:

> I looked through the rave-portal java code and for the most part, it looks
> like everyone is starting to keep consistent coding practices.  I think this
> is a good sign that the community is beginning to mature.
>
> There are few things I noticed and commented on in the code, but there was
> one thing I thought needed to be brought to the list.  Some of the Model
> objects define the names of the queries as constant Strings that are then
> used in the annotations and the repositories.  Others just use inline
> strings.  I think we need to pick one of the following approaches and make
> the necessary changes to keep consistency:
>
> 1) Use inline Strings
> 2) Define constant  Strings in the model classes
> 3) Create a Constants class that defines all strings used in named queries
>
> If no one cares which one we use, I will implement option 2.
>

Option 1 is too error prone, option 3 can grow to a very large class, so I'd
say option 2 is the best.
Still don't like the idea of defining the queries in the model when their
usage is in the Repository.

Jasha

Reply via email to