You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by "seba.wagner@gmail.com" <se...@gmail.com> on 2012/09/29 15:21:55 UTC

@NamedQuery will not work for admin area

Hi Maxim,

I've seen your standard patterns will use @NamedQuery whenever possible.

The "get" method in the OmDAO is likely to be enhanced with the parameters:
orderby, asc/desc

But orderby, asc/desc cannot be parameterized at runtime within a
@NamedQuery.
You have to use String concatenation to specify orderBy ASC/DESC (or you
write a NamedQuery for every possible combination of orderby + asc/desc)

So I think whenever the result of the query is displayed as a table then
the query should be created using String concatenation instead of
NamedQuery.

Sebastian
-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: @NamedQuery will not work for admin area

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Sure,

there is no need to add the sorting options right now in UI.
But the OmDao interface is quite general. So we might add those options to
the interface and make sure that any new DaoImpl/Query will implement it.

Sebastian

2012/9/29 Maxim Solodovnik <so...@gmail.com>

> I propose to implement basic functionality first, then add sorting and GUI
> enhansments.
> I'll take a look at sorting examples later and will implement it on the
> list.
>
> But right now I would better add basic functionality to all current items
> including chat :)
> On Sep 29, 2012 8:22 PM, "seba.wagner@gmail.com" <se...@gmail.com>
> wrote:
>
>> Hi Maxim,
>>
>> I've seen your standard patterns will use @NamedQuery whenever possible.
>>
>> The "get" method in the OmDAO is likely to be enhanced with the
>> parameters: orderby, asc/desc
>>
>> But orderby, asc/desc cannot be parameterized at runtime within a
>> @NamedQuery.
>> You have to use String concatenation to specify orderBy ASC/DESC (or you
>> write a NamedQuery for every possible combination of orderby + asc/desc)
>>
>> So I think whenever the result of the query is displayed as a table then
>> the query should be created using String concatenation instead of
>> NamedQuery.
>>
>> Sebastian
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>>
>


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: @NamedQuery will not work for admin area

Posted by Maxim Solodovnik <so...@gmail.com>.
I propose to implement basic functionality first, then add sorting and GUI
enhansments.
I'll take a look at sorting examples later and will implement it on the
list.

But right now I would better add basic functionality to all current items
including chat :)
On Sep 29, 2012 8:22 PM, "seba.wagner@gmail.com" <se...@gmail.com>
wrote:

> Hi Maxim,
>
> I've seen your standard patterns will use @NamedQuery whenever possible.
>
> The "get" method in the OmDAO is likely to be enhanced with the
> parameters: orderby, asc/desc
>
> But orderby, asc/desc cannot be parameterized at runtime within a
> @NamedQuery.
> You have to use String concatenation to specify orderBy ASC/DESC (or you
> write a NamedQuery for every possible combination of orderby + asc/desc)
>
> So I think whenever the result of the query is displayed as a table then
> the query should be created using String concatenation instead of
> NamedQuery.
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>