4
讓說我的陣列具有3個整數對象值= 3,4,5 我需要創建看起來像下面迭代陣列來創建休眠條件語句
criteria.add(Restrictions.and(Restrictions.not(Restrictions.eq(
"stepId", new Integer(3))), Restrictions.and(Restrictions
.not(Restrictions.eq("stepId", new Integer(4))), Restrictions
.not(Restrictions.eq("stepId", new Integer(5))))));
手動創建上述標準休眠標準,我不知道可以通過迭代
for(Iterator iterator = integerArray.iterator; iterator.hasNext()){
// create the criteria above
}