Finish V1 of List and Item Lambdas

List and Item Lambdas and client calls should be roughly finished (pending full testing once databse config is done).
This commit is contained in:
NMerz
2020-10-03 18:35:27 -04:00
parent f107ab023d
commit 1f361cf401
8 changed files with 227 additions and 12 deletions

View File

@@ -28,6 +28,12 @@ public class Requestor {
getObject(id, classType, receiver, null);
}
public <T> void getListOfIds(Class<T> ofType, Receiver<Integer[]> successHandler, RequestErrorHandler failureHandler) {
String getURL = DEV_BASEURL + "/" + ofType.getSimpleName() + "?list=-1";
Request postRequest = buildBaseRequest(getURL, "GET", null);
launchCall(postRequest, successHandler, Integer[].class, failureHandler);
}
public <T> void getObject(String id, Class<T> classType, Receiver<T> successHandler, RequestErrorHandler failureHandler) {
String getURL = DEV_BASEURL + "/" + classType.getSimpleName() + "?id=" + id;
Request postRequest = buildBaseRequest(getURL, "GET", null);

View File

@@ -34,6 +34,6 @@ public class SynchronousReceiver<T> implements Requestor.Receiver<T>, Requestor.
@Override
public void acceptError(IOException error) {
waiting = false;
this.error = error
this.error = error;
}
}