Session session = null;
try {
session = SessionFactory.openSession();
session.setAccurateProperties(accurateProperties);
// change the o's use_state
return session.query(lower, upper, currentPageNo, orderRules);
} finally {
if (session != null)
session.close();
}
}