You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to quer...@googlegroups.com
Right now i have code similar to:
public List<Tenant> findAllByKeyword(String keyword, String orderBy) { OrderSpecifier order= null; if (orderBy == null || "".equals(orderBy)) { order = qTenant.name.asc(); } else if ("name".equals(orderBy)) { order = qTenant.name.asc(); } else if ("description".equals(orderBy)) { order = qTenant.description.asc(); } else { throw new java.lang.IllegalArgumentException("The specified order by is not supported"); } .... }
I mean if i have the String "name" and the QType qTenant then How can i get the OrderSpecifier: qTenant.name.asc()?
fasfsfgs
unread,
Oct 27, 2012, 11:19:20 AM10/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Querydsl on behalf of Aldo Alfredo Gutiérrez Gutiérrez
I have the same situation because of how the client (gxt) tells me what column should I order by a server paged grid. It also gives me the asc/desc qualifier.
For example, it gives me the string "name asc".
For now, for those situations, I'm still using raw HQL.
Timo Westkämper
unread,
Oct 27, 2012, 11:26:21 AM10/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Querydsl on behalf of Aldo Alfredo Gutiérrez Gutiérrez
Hi.
The following should work
new ComparablePath<Comparable>(Comparable.class, qTenant, propertyName).asc();