}else if(resultClass.equals(ClassConstants.AOBJECT)){
return new CriteriaQueryImpl<T>(this.metamodel, ResultType.OBJECT_ARRAY, resultClass, this);
}else if (resultClass.isArray()){
return new CriteriaQueryImpl<T>(this.metamodel, ResultType.OBJECT_ARRAY, resultClass, this);
}else{
ManagedType type = this.metamodel.type(resultClass);
if (type != null && type.getPersistenceType().equals(PersistenceType.ENTITY)){
return new CriteriaQueryImpl(this.metamodel, ResultType.ENTITY, resultClass , this);
} else {
return new CriteriaQueryImpl(this.metamodel, ResultType.OTHER, resultClass, this);
}
}