Test Case is as follows :
This is the code that we are using :
Criteria fetchDsceDerivedDataCriteria = sess.createCriteria(TestBO.class);
fetchDsceDerivedDataCriteria.setProjection(projList) .add(Restrictions.eq("status" ,"RFS")) .setResultTransformer(Transformers.aliasToBean(TestBO.class)); fetchDsceDerivedDataCriteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
return fetchDsceDerivedDataCriteria;status
whereas TestBO.java is a DBEntity having property status and its getter and setter and some other properties.
|