Interface FieldSelector.FieldFilter

Enclosing class:
FieldSelector

@ThreadSafe public static interface FieldSelector.FieldFilter
This filter is designed to exclude or rename fields in a document.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(String field)
    Applies this filter to the full name of field to exclude or rename field.
    org.bson.BsonDocument
    apply(org.bson.BsonDocument doc)
    Applies this filter to the given document to exclude or rename fields.
    org.bson.Document
    apply(org.bson.Document doc)
    Applies this filter to the given document to exclude or rename fields.
    org.bson.BsonDocument
    applyChange(org.bson.BsonDocument doc)
    Applies this filter to the given change document to exclude or rename fields.
  • Method Details

    • apply

      org.bson.Document apply(org.bson.Document doc)
      Applies this filter to the given document to exclude or rename fields.
      Parameters:
      doc - document to exclude or rename fields
      Returns:
      modified document
    • apply

      org.bson.BsonDocument apply(org.bson.BsonDocument doc)
      Applies this filter to the given document to exclude or rename fields.
      Parameters:
      doc - document to exclude or rename fields
      Returns:
      modified document
    • applyChange

      org.bson.BsonDocument applyChange(org.bson.BsonDocument doc)
      Applies this filter to the given change document to exclude or rename fields.
      Parameters:
      doc - document to exclude or rename fields
      Returns:
      modified document
    • apply

      String apply(String field)
      Applies this filter to the full name of field to exclude or rename field.
      Parameters:
      field - the original name of field
      Returns:
      the new field name or null if the field should be removed