@SuppressWarnings(value = "unchecked")
@Override
public final T get(I id) {
Criteria criteria = createCriteria();
Criterion criterion = Restrictions.eq(Identifiable.PROP_ID, id);
criteria.add(criterion);
if (_deletable) {
Criterion notDeleted = Restrictions.eq(Undeletable.PROP_DELETED, new Boolean(false));
criteria.add(notDeleted);
}
return (T) _entityManager.find(_clazz, id);
}