@Test @Ignore public void testFunction() { JsonObject args = new JsonObject(); JsonObject response = GetAllEngagements.main(args); System.out.println(response); }
public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); Collection<Engagement> list = store.findAll(); System.out.println("Engagements count: " + store.count()); System.out.println("All Engagements : "); JsonArray jsonArray = (JsonArray) new Gson().toJsonTree(list, new TypeToken<List<Engagement>>() { }.getType()); response.add("result", jsonArray); return response; }
GetAllEngagements { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); Collection<Engagement> list = store.findAll(); System.out.println("Engagements count: " + store.count()); System.out.println("All Engagements : "); JsonArray jsonArray = (JsonArray) new Gson().toJsonTree(list, new TypeToken<List<Engagement>>() { }.getType()); response.add("result", jsonArray); return response; } }
GetAllEngagements { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); Collection<Engagement> list = store.findAll(); System.out.println("Engagements count: " + store.count()); System.out.println("All Engagements : "); JsonArray jsonArray = (JsonArray) new Gson().toJsonTree(list, new TypeToken<List<Engagement>>() { }.getType()); response.add("result", jsonArray); return response; }  }
GetAllEngagements { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); Collection<Engagement> list = store.findAll(); System.out.println("Engagements count: " + store.count()); System.out.println("All Engagements : "); JsonArray jsonArray = (JsonArray) new Gson().toJsonTree(list, new TypeToken<List<Engagement>>() { }.getType()); response.add("result", jsonArray); return response; }  static JsonObject main(JsonObject args); }
GetAllEngagements { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); EngagementStore store = new EngagementStore(args, "engagements"); Collection<Engagement> list = store.findAll(); System.out.println("Engagements count: " + store.count()); System.out.println("All Engagements : "); JsonArray jsonArray = (JsonArray) new Gson().toJsonTree(list, new TypeToken<List<Engagement>>() { }.getType()); response.add("result", jsonArray); return response; }  static JsonObject main(JsonObject args);  }