-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using Criteria.
PostPosted: Thu May 05, 2005 7:33 am 
Beginner
Beginner

Joined: Fri Aug 20, 2004 3:45 pm
Posts: 22
Location: Florence - ITALY
Can I use Criteria for do this?

Code:
from Article a where ( (a.q1-a.q2-a.q3)<0 )


Alternatively, how can I perform search where any parameter
mybe null? For now (tipically in web application serch form)
I have used Criteria. Example:

Code:
Criteria c = ....
if ( q1!=null ) {
c.add( Expression.eq( "quantity", q1);
}
if ( name!=null ) {
c.add( Expression.ilike( "name", q1);
}




Thanks,
Gianni Antini
Florence - ITALY


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.