criteria.setProjection(Projections.count(Identifiable.PROP_ID));
if (isDeletable()) {
Criterion notDeleted = Restrictions.eq(Undeletable.PROP_DELETED, new Boolean(false));
criteria.add(notDeleted);
}
Long count = (Long) criteria.uniqueResult(_entityManager);
return count;
}
@SuppressWarnings("unchecked")