/** * Builds a (potentially nested) projection based on the given projection, * and the location in the metadata field tree. */ public static Projector getInstance(Projection projection, Path ctxPath, FieldTreeNode ctx) { if (projection instanceof FieldProjection) { return new FieldProjector((FieldProjection) projection, ctxPath, ctx); } else if (projection instanceof ProjectionList) { return new ListProjector((ProjectionList) projection, ctxPath, ctx); } else if (projection instanceof ArrayRangeProjection) { return new ArrayRangeProjector((ArrayRangeProjection) projection, ctxPath, ctx); } else { return new ArrayQueryProjector((ArrayQueryMatchProjection) projection, ctxPath, ctx); } }
/** * Builds a (potentially nested) projection based on the given projection, * and the location in the metadata field tree. */ public static Projector getInstance(Projection projection, Path ctxPath, FieldTreeNode ctx) { if (projection instanceof FieldProjection) { return new FieldProjector((FieldProjection) projection, ctxPath, ctx); } else if (projection instanceof ProjectionList) { return new ListProjector((ProjectionList) projection, ctxPath, ctx); } else if (projection instanceof ArrayRangeProjection) { return new ArrayRangeProjector((ArrayRangeProjection) projection, ctxPath, ctx); } else { return new ArrayQueryProjector((ArrayQueryMatchProjection) projection, ctxPath, ctx); } }
/** * Builds a (potentially nested) projection based on the given projection, * and the location in the metadata field tree. */ public static Projector getInstance(Projection projection, Path ctxPath, FieldTreeNode ctx) { if (projection instanceof FieldProjection) { return new FieldProjector((FieldProjection) projection, ctxPath, ctx); } else if (projection instanceof ProjectionList) { return new ListProjector((ProjectionList) projection, ctxPath, ctx); } else if (projection instanceof ArrayRangeProjection) { return new ArrayRangeProjector((ArrayRangeProjection) projection, ctxPath, ctx); } else { return new ArrayQueryProjector((ArrayQueryMatchProjection) projection, ctxPath, ctx); } }