Exemplo n.º 1
0
 /** @since 0.14.0 */
 @ScriptUsage(
     description = "remove query",
     arguments = {@ScriptArgument(name = "query id", type = "int", description = "query id")})
 public void removeQuery(String[] args) {
   for (String arg : args) {
     Integer id = Integer.valueOf(arg);
     if (qs.getQuery(id) != null) {
       qs.removeQuery(id);
       context.println("removed query " + arg);
     } else {
       context.println("query " + id + " not found");
     }
   }
 }
Exemplo n.º 2
0
 /** @since 0.16.2 */
 public void removeAllQueries(String[] args) {
   for (Query q : qs.getQueries()) {
     qs.removeQuery(q.getId());
     context.println("removed query " + q.getId());
   }
 }