private void appendNeededFields(Map<String, Field> fields,
Collection<String> ks) {
for (String us : persistentFields.keySet()) {
if (ks.contains(us)) {
Field f = fields.get(us);
Class type = null;
if (persistentFields.containsKey(us)) {
type = persistentFields.get(us);
}
if (f.getType() == null) {
f.setType(type);
if (Collection.class.isAssignableFrom(type)) {
((GAEField) f).multiplicity = true;
f.setType(null);
}
}
continue;
}
GAEField f = new GAEField(us, true);
// f.setKeyKind(kind);
Class type = null;
if (persistentFields.containsKey(us)) {
type = persistentFields.get(us);
}
updateValues(us, null);
f.setType(type);
if (Collection.class.isAssignableFrom(type)) {
f.multiplicity = true;
f.setType(null);
}
fields.put(f.name, f);
}
}