Tabnine Logo
Projection.fromJson
Code IndexAdd Tabnine to your IDE (free)

How to use
fromJson
method
in
com.redhat.lightblue.query.Projection

Best Java code snippets using com.redhat.lightblue.query.Projection.fromJson (Showing top 20 results out of 315)

origin: com.redhat.lightblue/metadata

@Override
public Projection parseProjection(JsonNode object) {
  return object == null ? null : Projection.fromJson(object);
}
origin: com.redhat.lightblue/lightblue-core-metadata

@Override
public Projection getProjection(JsonNode object, String name) {
  JsonNode node = object.get(name);
  return node == null ? null : Projection.fromJson(node);
}
origin: lightblue-platform/lightblue-core

@Override
public Projection getProjection(JsonNode object, String name) {
  JsonNode node = object.get(name);
  return node == null ? null : Projection.fromJson(node);
}
origin: com.redhat.lightblue.mongo/mongo-metadata

@Override
public Projection parseProjection(BSONObject object) {
  return object == null ? null : Projection.fromJson(toJson(object));
}
origin: com.redhat.lightblue/crud

  /**
   * Parses a save request from a JSON object
   */
  public static SaveRequest fromJson(ObjectNode node) {
    SaveRequest req = new SaveRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    x = node.get("upsert");
    if (x != null) {
      req.upsert = x.asBoolean();
    }
    return req;
  }
}
origin: com.redhat.lightblue/crud

  /**
   * Parses an insertion request from a json object. Unrecognized elements are
   * ignored.
   */
  public static InsertionRequest fromJson(ObjectNode node) {
    InsertionRequest req = new InsertionRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    return req;
  }
}
origin: com.redhat.lightblue.mongo/lightblue-mongo

@Override
public Projection getProjection(Object object, String name) {
  String x = (String) ((BSONObject) object).get(name);
  return x == null ? null : Projection.fromJson(toJson(x));
}
origin: com.redhat.lightblue.mongo/lightblue-mongo-metadata

@Override
public Projection getProjection(BSONObject object, String name) {
  String x = (String) object.get(name);
  return x == null ? null : Projection.fromJson(toJson(x));
}
origin: com.redhat.lightblue/crud

/**
 * Parses a find request from a json object. Unrecognized elements are
 * ignored.
 */
public void fromJson(ObjectNode node) {
  JsonNode x = node.get("query");
  if (x != null) {
    query = QueryExpression.fromJson(x);
  }
  x = node.get("projection");
  if (x != null) {
    projection = Projection.fromJson(x);
  }
  x = node.get("sort");
  if (x != null) {
    sort = Sort.fromJson(x);
  }
  x = node.get("range");
  if (x instanceof ArrayNode && ((ArrayNode) x).size() == 2) {
    from = ((ArrayNode) x).get(0).asLong();
    to = ((ArrayNode) x).get(1).asLong();
  }
}
origin: com.redhat.lightblue/crud

  /**
   * Parses an update request from a Json object
   */
  public static UpdateRequest fromJson(ObjectNode node) {
    UpdateRequest req = new UpdateRequest();
    req.parse(node);
    JsonNode x = node.get("query");
    if (x != null) {
      req.query = QueryExpression.fromJson(x);
    }
    x = node.get("update");
    if (x != null) {
      req.updateExpression = UpdateExpression.fromJson(x);
    }
    x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    return req;
  }
}
origin: com.redhat.lightblue/lightblue-core-crud

/**
 * Parses a find request from a json object. Unrecognized elements are
 * ignored.
 */
public void fromJson(ObjectNode node) {
  JsonNode x = node.get("query");
  if (x != null) {
    query = QueryExpression.fromJson(x);
  }
  x = node.get("projection");
  if (x != null) {
    projection = Projection.fromJson(x);
  }
  x = node.get("sort");
  if (x != null) {
    sort = Sort.fromJson(x);
  }
  Range r = WithRange.fromJson(node);
  setFrom(r.from);
  setTo(r.to);
}
origin: lightblue-platform/lightblue-core

/**
 * Parses a find request from a json object. Unrecognized elements are
 * ignored.
 */
public void fromJson(ObjectNode node) {
  JsonNode x = node.get("query");
  if (x != null) {
    query = QueryExpression.fromJson(x);
  }
  x = node.get("projection");
  if (x != null) {
    projection = Projection.fromJson(x);
  }
  x = node.get("sort");
  if (x != null) {
    sort = Sort.fromJson(x);
  }
  Range r = WithRange.fromJson(node);
  setFrom(r.from);
  setTo(r.to);
}
origin: com.redhat.lightblue/lightblue-core-crud

  /**
   * Parses a save request from a JSON object
   */
  public static SaveRequest fromJson(ObjectNode node) {
    SaveRequest req = new SaveRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    x = node.get("upsert");
    if (x != null) {
      req.upsert = x.asBoolean();
    }
    WithIfCurrent.fromJson(req,node);
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: lightblue-platform/lightblue-core

  /**
   * Parses a save request from a JSON object
   */
  public static SaveRequest fromJson(ObjectNode node) {
    SaveRequest req = new SaveRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    x = node.get("upsert");
    if (x != null) {
      req.upsert = x.asBoolean();
    }
    WithIfCurrent.fromJson(req,node);
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: com.redhat.lightblue/lightblue-core-crud

  /**
   * Parses an insertion request from a json object. Unrecognized elements are
   * ignored.
   */
  public static InsertionRequest fromJson(ObjectNode node) {
    InsertionRequest req = new InsertionRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: lightblue-platform/lightblue-core

  /**
   * Parses an insertion request from a json object. Unrecognized elements are
   * ignored.
   */
  public static InsertionRequest fromJson(ObjectNode node) {
    InsertionRequest req = new InsertionRequest();
    req.parse(node);
    JsonNode x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: com.redhat.lightblue/lightblue-core-crud

  /**
   * Parses an update request from a Json object
   */
  public static UpdateRequest fromJson(ObjectNode node) {
    UpdateRequest req = new UpdateRequest();
    req.parse(node);
    JsonNode x = node.get("query");
    if (x != null) {
      req.query = QueryExpression.fromJson(x);
    }
    x = node.get("update");
    if (x != null) {
      req.updateExpression = UpdateExpression.fromJson(x);
    }
    x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    WithIfCurrent.fromJson(req,node);
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: lightblue-platform/lightblue-core

  /**
   * Parses an update request from a Json object
   */
  public static UpdateRequest fromJson(ObjectNode node) {
    UpdateRequest req = new UpdateRequest();
    req.parse(node);
    JsonNode x = node.get("query");
    if (x != null) {
      req.query = QueryExpression.fromJson(x);
    }
    x = node.get("update");
    if (x != null) {
      req.updateExpression = UpdateExpression.fromJson(x);
    }
    x = node.get("projection");
    if (x != null) {
      req.returnFields = Projection.fromJson(x);
    }
    WithIfCurrent.fromJson(req,node);
    Range r = WithRange.fromJson(node);
    req.setFrom(r.from);
    req.setTo(r.to);
    return req;
  }
}
origin: com.redhat.lightblue/lightblue-core-misc

if(node instanceof ArrayNode||
  node instanceof ObjectNode) {
  request.setProjection(Projection.fromJson(applyParameters(node,parameterValues)));
} else if(node instanceof TextNode) {
  request.setProjection(Projection.fromJson(JsonUtils.json(applyParameters(node.asText(),parameterValues))));
origin: lightblue-platform/lightblue-core

if(node instanceof ArrayNode||
  node instanceof ObjectNode) {
  request.setProjection(Projection.fromJson(applyParameters(node,parameterValues)));
} else if(node instanceof TextNode) {
  request.setProjection(Projection.fromJson(JsonUtils.json(applyParameters(node.asText(),parameterValues))));
com.redhat.lightblue.queryProjectionfromJson

Popular methods of Projection

  • toJson
  • getFieldInclusion
    Determine if the field is explicitly included/excluded, implicitly included, or the projection does
  • isFieldRequiredToEvaluateProjection
    Returns true if the field is needed to evaluate the projection
  • add
    Adds two projections and returns a new projection containing both. Any projection can be null. If th
  • toString
  • fieldAncestorOfPattern
    If the field is an ancestor of the pattern, and if inclusion is true, returns true. Otherwise, retur
  • fieldMatchesPattern
    Returns whether to include/exclude the field based on whether the field matches the pattern
  • impliedInclusion
    Returns if the field should be included based on the recursive pattern.
  • isFieldIncluded
    Returns if the field should be included based on the pattern given.
  • toMask
    If a path includes array indexes, change the indexes into ANY

Popular in Java

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now