use of org.activityinfo.store.hrd.entity.FormSchemaEntity in project activityinfo by bedatadriven.
the class HrdStorageProvider method getFormClasses.
@Override
public Map<ResourceId, FormClass> getFormClasses(Collection<ResourceId> formIds) {
Set<Key<FormSchemaEntity>> toLoad = new HashSet<>();
for (ResourceId formId : formIds) {
toLoad.add(FormSchemaEntity.key(formId));
}
Map<Key<FormSchemaEntity>, FormSchemaEntity> entityMap = ObjectifyService.ofy().load().keys(toLoad);
Map<ResourceId, FormClass> formClassMap = new HashMap<>();
for (FormSchemaEntity formSchema : entityMap.values()) {
formClassMap.put(formSchema.getFormId(), formSchema.readFormClass());
}
return formClassMap;
}
Aggregations