if(nqt == null) throw new InvalidCriteriaException("No db4o named query translator specified.");
nqt.translateNamedQuery(criteria.getNamedQueryDefinition(), criteria.getQueryParams(), query);
}
else {
query.constrain(criteria.getEntityClass());
final CriterionGroup pg = criteria.getPrimaryGroup();
if(pg != null && pg.isSet()) {
for(final ICriterion ic : pg) {
if(ic.isGroup()) throw new InvalidCriteriaException("Nested criterion groups are not supported");
if(!ic.isSet()) throw new InvalidCriteriaException("criterion not set");
final Criterion ctn = (Criterion) ic;
final Object checkValue = ctn.getValue();