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

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

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

origin: org.esbtools.lightblue-notification-hook/lightblue-notification-hook

private Projection addArrayIdentities(Projection p,EntityMetadata md) {
  // If an array is included in the projection, make sure its identity is also included
  Map<Path,List<Path>> arrayIdentities=md.getEntitySchema().getArrayIdentities();
  List<Projection> addFields=new ArrayList<>();
  for(Map.Entry<Path,List<Path>> entry:arrayIdentities.entrySet()) {
    Path array=entry.getKey();
    List<Path> identities=new ArrayList<>();
    for(Path x:entry.getValue())
      identities.add(new Path(array,new Path(Path.ANYPATH,x)));
    
    if(isProjected(array,p)) {
      for(Path id:identities) {
        if(!isProjected(id,p)) {
          addFields.add(new FieldProjection(id,true,true));
        }
      }
    }
  }
  if(!addFields.isEmpty()) {
    LOGGER.debug("Excluded array identities are added to projection:{}",addFields);
    // Need to first add the original projection, then the included fields.
    // This is order sensitive
    return Projection.add(p,new ProjectionList(addFields));
  } else
    return p;
}

origin: com.redhat.lightblue.mongo/lightblue-mongo

DBCollection collection = db.getCollection(store.getCollectionName());
Projection combinedProjection = Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find));
origin: com.redhat.lightblue.mongo/lightblue-mongo-crud

DBCollection collection = db.getCollection(store.getCollectionName());
Projection combinedProjection = Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find));
origin: com.redhat.lightblue.mongo/lightblue-mongo-crud

response.setSize(finder.find(ctx, coll, mongoQuery, mongoProjection, mongoSort, from, to));
Projector projector = Projector.getInstance(Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find)), md);
for (DocCtx document : ctx.getDocuments()) {
  document.setOutputDocument(projector.project(document, ctx.getFactory().getNodeFactory()));
origin: com.redhat.lightblue.mongo/lightblue-mongo

    : Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find)), md);
ctx.setDocumentStream(DocumentStream.map(ctx.getDocumentStream(),d->{
      ctx.measure.begin("projectFound");
origin: com.redhat.lightblue.mongo/lightblue-mongo-crud

Projection x = Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find));
LOGGER.debug("Projection={}", x);
projector = Projector.getInstance(x, md);
origin: com.redhat.lightblue.mongo/lightblue-mongo

Projection x = Projection.add(projection, roleEval.getExcludedFields(FieldAccessRoleEvaluator.Operation.find));
LOGGER.debug("Projection={}", x);
projector = Projector.getInstance(x, md);
com.redhat.lightblue.queryProjectionadd

Javadoc

Adds two projections and returns a new projection containing both. Any projection can be null. If the resulting projection is empty, returns null.

Popular methods of Projection

  • fromJson
  • 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
  • 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

  • Making http requests using okhttp
  • putExtra (Intent)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
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