HibernateCriteriaBuilder
基準クエリを作成するためにAPIを使用しています。内部にステートメントCriteria
などの条件付きロジックを含めることができるかどうかを知りたいですか?if
例えば:
OnemonthList=it.createCriteria().list {
if (res_id!='all'){
eq('graresource',resourceInstance)
}
between('currentdate', fromDate, toDate)
projections {
trans {
countDistinct('id')
}
groupProperty('currentdate')
}
}
これは有効ですか?