Commit c4a7691e authored by Raimbek Egemberdiev's avatar Raimbek Egemberdiev

advanced search one

parent 9aac5358
...@@ -45,6 +45,12 @@ public class AsFormService { ...@@ -45,6 +45,12 @@ public class AsFormService {
return JsonUtils.read(result, new TypeReference<List<AdvancedSearchResult>>() {}); return JsonUtils.read(result, new TypeReference<List<AdvancedSearchResult>>() {});
} }
public List<AdvancedSearchResult> advancedSearch(String formId, String key, String value) throws IOException {
return advancedSearch(AdvancedSearchParams.build(
String.format("where uuid='%s' and %s='%s'", formId, key, value), key
));
}
public <T extends AsForm> T fetch(Class<T> formClass, String dataUUID) throws IOException { public <T extends AsForm> T fetch(Class<T> formClass, String dataUUID) throws IOException {
String data = restHttpQuery.doQuery(Query.newInstance().url("/rest/api/asforms/data/" + dataUUID)); String data = restHttpQuery.doQuery(Query.newInstance().url("/rest/api/asforms/data/" + dataUUID));
return asfFormConverter.toAsForm(formClass, JsonUtils.read(data, AsFormWrapper.class)); return asfFormConverter.toAsForm(formClass, JsonUtils.read(data, AsFormWrapper.class));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment