/** * Appends the given integer (array index) to the current path segments. * * @param x the array index * @return the updated path */ public MutablePath push(int x) { return push(Integer.toString(x)); }
/** * Appends the given integer (array index) to the current path segments. * * @param x the array index * @return the updated path */ public MutablePath push(int x) { return push(Integer.toString(x)); }
/** * Appends the given integer (array index) to the current path segments. * * @param x the array index * @return the updated path */ public MutablePath push(int x) { return push(Integer.toString(x)); }
public MutablePath getFullPath(MutablePath mp) { parent.getFullPath(mp); mp.push(Path.ANY); return mp; }
/** * Sets this path to p */ public MutablePath set(Path p) { return clear().push(p); }
/** * Sets this path to p */ public MutablePath set(Path p) { return clear().push(p); }
public MutablePath getFullPath(MutablePath mp) { parent.getFullPath(mp); mp.push(Path.ANY); return mp; }
private QueryEvaluationContext(QueryEvaluationContext ctx, JsonNode root, Path relativePath) { this.root = ctx.root; this.contextRoot = root; this.contextPath = new MutablePath(ctx.contextPath); this.contextPath.push(relativePath); }
public MutablePath getFullPath(MutablePath mp) { if (parent != null) { parent.getFullPath(mp); } mp.push(name); return mp; }
@Override public MutablePath getFullPath(MutablePath mp) { if (parent != null) { parent.getFullPath(mp); } mp.push(name); return mp; }
private QueryEvaluationContext(QueryEvaluationContext ctx, JsonNode root, Path relativePath) { this.contextRoot = root; this.contextPath = new MutablePath(ctx.contextPath); this.contextPath.push(relativePath); }
public MutablePath getFullPath(MutablePath mp) { parent.getFullPath(mp); mp.push(Path.ANY); return mp; }
private QueryEvaluationContext(QueryEvaluationContext ctx, JsonNode root, Path relativePath) { this.root = ctx.root; this.contextRoot = root; this.contextPath = new MutablePath(ctx.contextPath); this.contextPath.push(relativePath); }
@Override public MutablePath getFullPath(MutablePath mp) { if (parent != null) { parent.getFullPath(mp); } mp.push(name); return mp; }
/** * Sets this path to p */ public MutablePath set(Path p) { return clear().push(p); }
public QueryEvaluationContext firstElementNestedContext(JsonNode node, Path arrayField) { MutablePath p = new MutablePath(arrayField); p.push(0); return new QueryEvaluationContext(this, node, p); }
public QueryEvaluationContext firstElementNestedContext(JsonNode node, Path arrayField) { MutablePath p = new MutablePath(arrayField); p.push(0); return new QueryEvaluationContext(this, node, p); }
public QueryEvaluationContext firstElementNestedContext(JsonNode node, Path arrayField) { MutablePath p = new MutablePath(arrayField); p.push(0); return new QueryEvaluationContext(this, node, p); }
/** * Get a reference to the hidden path's actual field. * * This does not guarantee the sub-path exists. * * @param path * @return */ public static Path getFieldForHidden(Path hiddenPath) { return hiddenPath.prefix(-2).mutableCopy().push(hiddenPath.getLast()); }
private Path translateIndexPath(Path p) { MutablePath newPath = new MutablePath(); int n = p.numSegments(); for (int i = 0; i < n; i++) { String x = p.head(i); if (!x.equals(Path.ANY)) { if (p.isIndex(i)) { throw Error.get(MongoCrudConstants.ERR_INVALID_INDEX_FIELD, p.toString()); } newPath.push(x); } } return newPath.immutableCopy(); }