Examples of CriteriaAdapter


Examples of org.talend.esb.sam.server.ui.CriteriaAdapter

  public void testSQLValuesProvider() throws Exception {
    Map<String, String[]> params = new HashMap<String, String[]>();
    params.put("ignore", new String[] {"ha ha"});
    params.put("port", new String[] {"port*"});
    params.put("operation", new String[] {"blah"});
    CriteriaAdapter adapter = new CriteriaAdapter(0, 100, params);
    assertTrue(adapter.hasValue("limit") && adapter.hasValue("offset"));
    assertTrue(adapter.hasValue("port") && adapter.hasValue("operation"));
  }
View Full Code Here

Examples of org.talend.esb.sam.server.ui.CriteriaAdapter

    assertTrue(adapter.hasValue("limit") && adapter.hasValue("offset"));
    assertTrue(adapter.hasValue("port") && adapter.hasValue("operation"));
  }

  private String getWhereClause(Map<String, String[]> params) {
    return new CriteriaAdapter(0, 100, params).getWhereClause();
  }
View Full Code Here

Examples of org.talend.esb.sam.server.ui.CriteriaAdapter

        template.query(EasyMock.capture(creator),
            EasyMock.capture(mapper))).andReturn(
        objects);
    // Test
    EasyMock.replay(template);
    JsonObject result = provider.getEvents(0, "base", new CriteriaAdapter(0, 100,
        parameters));
    EasyMock.verify(template);
    return result;
  }
View Full Code Here

Examples of org.talend.esb.sam.server.ui.CriteriaAdapter

        Map<String, String[]> params = new HashMap<String, String[]>();
        MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
        for (Entry<String, List<String>> entry : queryParams.entrySet()) {
            params.put(entry.getKey(), entry.getValue().toArray(new String[] {}));
        }
        CriteriaAdapter adapter = new CriteriaAdapter(offset, limit, params);
        FlowCollection flowCollection = provider.getFlows(adapter);
        return Response.ok(aggregateRawData(flowCollection)).build();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.