public class ObservableDocumentEditor extends DocumentEditor
Document.Field, Document.ValueTransformer
factory
Constructor and Description |
---|
ObservableDocumentEditor(MutableDocument document,
Path path,
DocumentObserver delta,
DocumentValueFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected Object |
copy(Object value) |
protected EditableArray |
createEditableArray(MutableArray array,
String fieldName,
DocumentValueFactory factory) |
protected EditableDocument |
createEditableDocument(MutableDocument document,
String fieldName,
DocumentValueFactory factory) |
protected void |
doSetAllValues(Document values)
The method that does the actual setting for all of the
DocumentEditor.putAll(Document) method. |
protected void |
doSetAllValues(Map<? extends String,? extends Object> values)
The method that does the actual setting for all of the
DocumentEditor.putAll(Map) method. |
protected Object |
doSetValue(String name,
Object newValue)
The method that does the actual setting for all of the
set... |
protected Object |
doSetValueIfAbsent(String name,
Object value)
The method that does the actual setting for all of the
set... |
Object |
remove(String name)
Remove the field with the supplied name, and return the value.
|
void |
removeAll()
Remove all fields from this document.
|
asMutableDocument, clone, containsAll, containsField, editable, editable, fields, get, getArray, getBinary, getBoolean, getBoolean, getCode, getCodeWithScope, getDocument, getDouble, getDouble, getInteger, getInteger, getLong, getLong, getMaxKey, getMinKey, getNumber, getNumber, getObjectId, getOrCreateArray, getOrCreateDocument, getPattern, getString, getString, getSymbol, getType, getUuid, getUuid, isEmpty, isNull, isNullOrMissing, keySet, merge, put, putAll, putAll, set, setArray, setArray, setArray, setBinary, setBoolean, setCode, setCode, setDate, setDate, setDocument, setDocument, setNull, setNumber, setNumber, setNumber, setNumber, setObjectId, setObjectId, setObjectId, setRegularExpression, setRegularExpression, setString, setSymbol, setTimestamp, setUuid, size, toMap, toString, unwrap, with, with, with, withVariablesReplaced, withVariablesReplacedWithSystemProperties
public ObservableDocumentEditor(MutableDocument document, Path path, DocumentObserver delta, DocumentValueFactory factory)
protected Object doSetValue(String name, Object newValue)
DocumentEditor
set...
methods. This method may be overridden by
subclasses when additional work needs to be performed during the set operations.doSetValue
in class DocumentEditor
name
- the name of the field being setnewValue
- the new valueprotected Object doSetValueIfAbsent(String name, Object value)
DocumentEditor
set...
methods. This method may be overridden by
subclasses when additional work needs to be performed during the set operations.doSetValueIfAbsent
in class DocumentEditor
name
- the name of the field being setvalue
- the new valueprotected void doSetAllValues(Document values)
DocumentEditor
DocumentEditor.putAll(Document)
method. This method may be overridden by
subclasses when additional work needs to be performed during this operation.doSetAllValues
in class DocumentEditor
values
- the document containing the fields to be addedprotected void doSetAllValues(Map<? extends String,? extends Object> values)
DocumentEditor
DocumentEditor.putAll(Map)
method. This method may be overridden by
subclasses when additional work needs to be performed during this operation.doSetAllValues
in class DocumentEditor
values
- the map containing the fields to be addedpublic Object remove(String name)
EditableDocument
remove
in interface EditableDocument
remove
in class DocumentEditor
name
- The name of the fieldpublic void removeAll()
EditableDocument
removeAll
in interface EditableDocument
removeAll
in class DocumentEditor
protected EditableDocument createEditableDocument(MutableDocument document, String fieldName, DocumentValueFactory factory)
createEditableDocument
in class DocumentEditor
protected EditableArray createEditableArray(MutableArray array, String fieldName, DocumentValueFactory factory)
createEditableArray
in class DocumentEditor
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.