public String executeUpdate(@FormParam("jpql") String jpql)
throws InstantiationException, IllegalAccessException,
ClassNotFoundException {
try {
int results = jpaDaoService.execute(jpql);
StatusModel result = new StatusModel(true, results + " rows affected");
return gson.toJson(result);
} catch (Exception e) {
StatusModel failure = new StatusModel(false, "Could not execute query: " + e.getMessage());
return gson.toJson(failure);
}
}