Class FieldSelector.RenamePath

    • Field Detail

      • newFieldNode

        private final String newFieldNode
      • newField

        private final String newField
    • Constructor Detail

      • RenamePath

        private RenamePath​(Pattern namespacePattern,
                           String[] oldFieldNodes,
                           String newFieldNode)
    • Method Detail

      • modifyField

        void modifyField​(Map<String,​Object> doc,
                         String field)
        Description copied from class: FieldSelector.Path
        Modifies the field in the document used for read, insert and full update operations.
        Specified by:
        modifyField in class FieldSelector.Path
        Parameters:
        doc - the document to modify field
        field - the modified field
      • modifyFieldWithDotNotation

        void modifyFieldWithDotNotation​(Map<String,​Object> doc,
                                        String field)
        Description copied from class: FieldSelector.Path
        Immediately modifies the field that uses the dot notation like 'a.b' in the document used for set and unset update operations.
        Specified by:
        modifyFieldWithDotNotation in class FieldSelector.Path
        Parameters:
        doc - the document to modify field
        field - the modified field
      • replaceLastNameNode

        private String replaceLastNameNode​(String[] nameNodes,
                                           String lastNameNode)
        Replaces a last name node in the given name nodes, if the name nodes contain only one node, the last name node is returned.
        Parameters:
        nameNodes - the name nodes to replace
        lastNameNode - the last name node
        Returns:
        replaced name or last name node