Package com.findwise.hydra.admin.database

Examples of com.findwise.hydra.admin.database.AdminServiceQuery.fromJson()


  public Map<String, Object> getNumberOfDocuments(String jsonQuery) {
    Map<String, Object> ret = new HashMap<String, Object>();

    try {
      DatabaseQuery<AdminServiceType> query = new AdminServiceQuery();
      query.fromJson(jsonQuery);
      ret.put("numberOfDocuments", getNumberOfDocuments(connector.convert(query)));

    } catch (JsonException e) {
      Map<String, String> error = new HashMap<String, String>();
      error.put("Invalid query", jsonQuery);
View Full Code Here


  public Map<String, Object> getDocuments(String jsonQuery, int limit, int skip) {
    Map<String, Object> ret = new HashMap<String, Object>();

    try {
      DatabaseQuery<AdminServiceType> query = new AdminServiceQuery();
      query.fromJson(jsonQuery);
      ret.put("documents", getDocuments(connector.convert(query), limit, skip));

    } catch (JsonException e) {
      Map<String, String> error = new HashMap<String, String>();
      error.put("Invalid query", jsonQuery);
View Full Code Here

      String changes) {

    Map<String, Object> ret = new HashMap<String, Object>();
    try {
      DatabaseQuery<AdminServiceType> query = new AdminServiceQuery();
      query.fromJson(jsonQuery);
      List<DatabaseDocument<T>> documents = getDocuments(
          connector.convert(query), limit, 0);

      if (!documents.isEmpty()) {
View Full Code Here

  public Map<String, Object> discardDocuments(String jsonQuery, int limit, int skip) {
    Map<String, Object> ret = new HashMap<String, Object>();

    try {
      DatabaseQuery<AdminServiceType> query = new AdminServiceQuery();
      query.fromJson(jsonQuery);
      boolean success = discardDocuments(connector.convert(query), limit, skip);
      ret.put("success", success);

    } catch (JsonException e) {
      Map<String, String> error = new HashMap<String, String>();
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.