java - Hibernate Criteria Projection Property -


i using hibernate criteria projections property. want test 'is null' condition before adding projection list.

consider sample example

.add(projections.property("normalrange"),"normalrange") 

i want test property value null , operations

(i.e) in mysql

if(normalrange null,testrange,normalrange) normalrange 

how achieve query in hibernate criteria ?

i hope questions clear. please !


Comments