-
1. Re: framework:entity-query class attribute
pmuir May 9, 2007 4:51 AM (in response to fernando_jmt)Just extend it and use the @Name attribute (just like an EntityHome)
-
2. Re: framework:entity-query class attribute
fernando_jmt May 9, 2007 7:34 AM (in response to fernando_jmt)Thanks Pete, for your suggestion, nevertheless that was something I did previously.
To be specific, in the extended EntityQuery I added some generic (for all lists) methods like the total pages and the current page (among others). These changes should be used for all entity-queries in my app. Now, your suggestion obliges me to create one class for every entity query and annotate it with @Name, and each class will have exactly the same methods. I think this is not a very good solution (a lot of classes only difering the @Name, even if I have a super class I will need to extend it and add a @Name for each one), and this is the reason I ask if the entity-query class attribute can be used for that purpose (to use an extended EntityQuery instead the Seam EntityQuery directly).
Hope now is more clear than before, and you can point me out.
Thanks in advance. -
3. Re: framework:entity-query class attribute
pmuir May 9, 2007 8:08 AM (in response to fernando_jmt)Ah, in that case:
public abstract class MyEntityQuery extends EntityQuery { // Overridden/extra methods }
<component name="fooQuery" class="MyEntityQuery"> <property name="maxResults">10</maxResults> <component>
- you loose the namespace stuff in components.xml. You could always set up your own namespace for MyEntityQuery if you like.
HTH -
4. Re: framework:entity-query class attribute
fernando_jmt May 9, 2007 9:33 AM (in response to fernando_jmt)Thanks Pete.
I also thought in that solution. But I was afraid to loose the namespace stuff for entity-query. Now, I think this is my only chance (or define my own namespace).
Only by curiosity. Do you know what is the purpose of the "class" attribute in the <framework:entity-query> stuff? I looked for it in the seam reference, but I cannot find it.
Thanks. -
5. Re: framework:entity-query class attribute
pmuir May 9, 2007 10:33 AM (in response to fernando_jmt)There isn't any afaik.