not(Criterion expression)
引數說明:Criteria criteria = session.createCriteria(PersonForm.class); //定義Criteria物件 String[] arr ={"大專","本科","研究生"}; //定義查詢字串物件 criteria.add(Restrictions.not(Restrictions.in("knowledge",arr))); //查詢學歷不為指定字串的員工資訊 list = criteria.list(); //執行查詢語句