@ThreadSafe private static final class FieldSelector.RenamePath extends FieldSelector.Path
| Modifier and Type | Field and Description |
|---|---|
private String |
newField |
private String |
newFieldNode |
field, fieldNodes, namespacePattern| Modifier | Constructor and Description |
|---|---|
private |
RenamePath(Pattern namespacePattern,
String[] oldFieldNodes,
String newFieldNode) |
| Modifier and Type | Method and Description |
|---|---|
(package private) FieldSelector.FieldNameAndValue |
generateNewFieldName(String[] fieldNodes,
Object value)
Generates a new field name for the given value.
|
(package private) void |
modifyField(org.bson.Document doc,
String field)
Modifies the field in the document used for read, insert and full update operations.
|
(package private) void |
modifyFieldWithDotNotation(org.bson.Document doc,
String field)
Immediately modifies the field that uses the dot notation like
'a.b' in the document used for set and
unset update operations. |
private String |
rename(String[] nameNodes) |
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.
|
checkFieldExists, matches, modify, toStringvoid modifyField(org.bson.Document doc,
String field)
FieldSelector.PathmodifyField in class FieldSelector.Pathdoc - the document to modify fieldfield - the modified fieldvoid modifyFieldWithDotNotation(org.bson.Document doc,
String field)
FieldSelector.Path'a.b' in the document used for set and
unset update operations.modifyFieldWithDotNotation in class FieldSelector.Pathdoc - the document to modify fieldfield - the modified fieldFieldSelector.FieldNameAndValue generateNewFieldName(String[] fieldNodes, Object value)
FieldSelector.PathgenerateNewFieldName in class FieldSelector.PathfieldNodes - the field nodesvalue - the field valueprivate String replaceLastNameNode(String[] nameNodes, String lastNameNode)
nameNodes - the name nodes to replacelastNameNode - the last name nodeCopyright © 2019 JBoss by Red Hat. All rights reserved.