/**
* 执行count查询获得本次Criteria查询所能获得的对象总数.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
protected long countCriteriaResult(final Criteria c) {
CriteriaImpl impl = (CriteriaImpl) c;
// 先把Projection、ResultTransformer、OrderBy取出来,清空三者后再执行Count操作
Projection projection = impl.getProjection();
ResultTransformer transformer = impl.getResultTransformer();
List<CriteriaImpl.OrderEntry> orderEntries = null;
try {
orderEntries = (List<OrderEntry>) ReflectionUtils.getFieldValue(impl,"orderEntries");
ReflectionUtils.setFieldValue(impl, "orderEntries", new ArrayList());