[jboss-user] [JBoss Seam] - Search with EntityQuery and OR operator
enda
do-not-reply at jboss.com
Thu Jan 17 20:08:45 EST 2008
I am sure that a lot of you need sometimes the same think as me. I have a simple search that applies one input to more search parameters. But I did not find any nice way to change 'AND'ed criteria to 'OR'ed.
As I was hacking it, I did this:
|
| ...
| public class SimplePersonList extends EntityQuery {
| ....
| protected String getRenderedEjbql() {
| String ejbql = super.getRenderedEjbql();
| return ejbql.replaceAll(" and ", " or ");
| }
| ....
|
Tada thats it and works.
---
Do you have a better way to do this? I consider my version as a little hack and expect that Seam also expects requirements as I need.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121147#4121147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121147
More information about the jboss-user
mailing list