-->
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: criteria question: cond0 and (cond1 and cond2 ) or cond4
PostPosted: Fri Dec 03, 2010 4:06 pm 
Newbie

Joined: Sun Jun 13, 2010 5:08 pm
Posts: 4
Hello,

I would like to build up a criteria with following conditions
- some variables must be checked whether it is null or not.
- query must be criteria

the outcome must be look like this:
(fieldname1 == var1)
and (if var2 != null (fieldname2 == var2)
and if var3 != null (fieldname3 == var3)
and if var4 != null (fieldname4 == var4) )
or (fieldname5 == null)

I don't know the way how can I add the middle part with checking null.

Thanks ahead.

Csaba


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.