Object[] fields = objClass.getDeclaredFields();
ArrayList<Field> embedded = new ArrayList<Field>();
for(int i=0; i<fields.length; i++) {
Field field = (Field) fields[i];
DefineQueryProperty gen = field.getAnnotation(DefineQueryProperty.class);
if(gen == null) {
continue;
} else if(gen.embedded()) {
embedded.add(field);
}
QEntityProperty qep = null;
Class type = field.getType();
String name = path + field.getName();
if(type.isAnnotationPresent(Entity.class)) {
qep = new QueryEntityObjectField(parent, type, gen.title(), gen.desc(), name);
} else {
qep = new QueryEntityField(parent, type, gen.title(), gen.desc(), name);
}
res.add(qep);
}
//embedded properties