Class FieldSelector.FieldSelectorBuilder

  • Enclosing class:
    FieldSelector

    public static class FieldSelector.FieldSelectorBuilder
    extends Object
    A builder of a field selector.
    • Field Detail

      • fullyQualifiedFieldNames

        private String fullyQualifiedFieldNames
      • fullyQualifiedFieldReplacements

        private String fullyQualifiedFieldReplacements
    • Constructor Detail

      • FieldSelectorBuilder

        private FieldSelectorBuilder()
    • Method Detail

      • excludeFields

        public FieldSelector.FieldSelectorBuilder excludeFields​(String fullyQualifiedFieldNames)
        Specifies the comma-separated list of fully-qualified field names that should be included.
        Parameters:
        fullyQualifiedFieldNames - the comma-separated list of fully-qualified field names to exclude; may be null or empty
        Returns:
        this builder so that methods can be chained together; never null
      • renameFields

        public FieldSelector.FieldSelectorBuilder renameFields​(String fullyQualifiedFieldReplacements)
        Specifies the comma-separated list of fully-qualified field replacements to rename fields.
        Parameters:
        fullyQualifiedFieldReplacements - the comma-separated list of fully-qualified field replacements to rename fields; may be null or empty
        Returns:
        this builder so that methods can be chained together; never null
      • build

        public FieldSelector build()
        Builds the filter selector that returns the field filter for a given collection identifier, using the comma-separated list of fully-qualified field names (for details, see MongoDbConnectorConfig.FIELD_EXCLUDE_LIST) defining which fields (if any) should be excluded, and using the comma-separated list of fully-qualified field replacements (for details, see MongoDbConnectorConfig.FIELD_RENAMES) defining which fields (if any) should be renamed.
        Returns:
        the filter selector that returns the filter to exclude or rename fields in a document
      • selectNamespacePartAsPattern

        private Pattern selectNamespacePartAsPattern​(String[] expressionNodes)
      • selectFieldPartAsNodes

        private String[] selectFieldPartAsNodes​(String[] expressionNodes)