JDOQuery q = (JDOQuery) createQuery(null);
Class c = extent.getCandidateClass();
q.setIncludeSubClasses(extent.hasSubclasses());
q.setClass(c);
if (getObjectIdClass(c) == null)
throw new JDOUnsupportedOptionException(
"There is a problem with the specified class");
return q;
}