public abstract class Projector extends Object
true, the field is
included, and projection continues to the subtree under that field. If the
projection evaluates to false, that subtree is excluded. If the
projection for that field cannot be decided, the a warning is logged, and
field is excluded. Array fields can have nested projections to project their
array elements.
Recursive inclusion projections don't cross entity boundaries (i.e.
references) unless there is an explicit inclusion projection for the
referenced entity, or a field under that entity.| Modifier | Constructor and Description |
|---|---|
protected |
Projector(Path ctxPath,
FieldTreeNode ctx) |
| Modifier and Type | Method and Description |
|---|---|
static Projector |
getInstance(Projection projection,
EntityMetadata md)
Builds a projector using the given projection and entity metadata
|
static Projector |
getInstance(Projection projection,
Path ctxPath,
FieldTreeNode ctx)
Builds a (potentially nested) projection based on the given projection,
and the location in the metadata field tree.
|
abstract Projector |
getNestedProjector()
Returns the nested projector for this path *only if*
project
returns true. |
JsonDoc |
project(JsonDoc doc,
com.fasterxml.jackson.databind.node.JsonNodeFactory factory)
Projects a document
|
abstract Projection.Inclusion |
project(Path p,
QueryEvaluationContext ctx)
Returns true, false, or null if the result cannot be determined.
|
protected Projector(Path ctxPath, FieldTreeNode ctx)
public abstract Projector getNestedProjector()
project
returns true. Nested projector is used to project array elements. When a
nested projector exists, projection operation should use the nested
projector to project array elements. May return null, which means to
continue using existing projector (this).public abstract Projection.Inclusion project(Path p, QueryEvaluationContext ctx)
p - The absolute field pathctx - Query evaluation contextpublic static Projector getInstance(Projection projection, EntityMetadata md)
public static Projector getInstance(Projection projection, Path ctxPath, FieldTreeNode ctx)
Copyright © 2016. All rights reserved.