public class NodeChanger extends NodeWrapper
isChangedByThis()'.
Before commiting the node, you may want to check if you changed to node, and not some
other thread. In that case you can first wrap your Node in a NodeChanger object.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
originalValues |
nodeCLOUD_COMMITNODE_KEY| Constructor and Description |
|---|
NodeChanger(Node node) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelThis() |
protected void |
change(String fieldName) |
boolean |
isChangedByThis()
The
NodeWrapper.isChanged(java.lang.String) method reflects the isChanged status of the underlying core node.isChanged,
this one does that too, but only return true, if this instance performed this change. |
void |
setBooleanValue(String fieldName,
boolean value)
Sets the value of the specified field using an
boolean. |
void |
setByteValue(String fieldName,
byte[] value)
Sets the value of the specified field using a
byte array. |
void |
setDateValue(String fieldName,
Date value)
Sets the value of the specified field using a
Date. |
void |
setDoubleValue(String fieldName,
double value)
Sets the value of the specified field using a
double. |
void |
setFloatValue(String fieldName,
float value)
Sets the value of the specified field using a
float. |
void |
setInputStreamValue(String fieldName,
InputStream value,
long size)
Sets the value of the specified field using a
java.io.InputStream. |
void |
setIntValue(String fieldName,
int value)
Sets the value of the specified field using an
int. |
void |
setListValue(String fieldName,
List value)
Sets the value of the specified field using a
List. |
void |
setLongValue(String fieldName,
long value)
Sets the value of the specified field using a
long. |
void |
setNodeValue(String fieldName,
Node value)
Sets the value of the specified field using an
Node. |
void |
setObjectValue(String fieldName,
Object value)
Sets the value of the specified field using an object, but without dispatching to the right
type first.
|
void |
setStringValue(String fieldName,
String value)
Sets the value of the specified field using a
String. |
void |
setValue(String fieldName,
Object value)
Sets the value of the specified field using an object, but delegated to the right
set--Value depending on the type of the field.
|
void |
setValueWithoutProcess(String fieldName,
Object value)
Like setValue, but skips any processing that MMBase would normally perform on a field.
|
cancel, commit, compareTo, countRelatedNodes, countRelatedNodes, countRelations, countRelations, createAlias, createParameters, createRelation, delete, delete, deleteAlias, deleteRelations, deleteRelations, equals, getAliases, getBooleanValue, getByteValue, getChanged, getCloud, getContext, getDateValue, getDecimalValue, getDoubleValue, getFieldValue, getFieldValue, getFloatValue, getFunction, getFunctions, getFunctionValue, getInputStreamValue, getIntValue, getListValue, getLongValue, getNode, getNodeManager, getNodeValue, getNumber, getObjectValue, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getRelations, getRelations, getSize, getStringValue, getValue, getValueWithoutProcess, getXMLValue, getXMLValue, hashCode, hasRelations, isChanged, isChanged, isNew, isNodeManager, isNull, isRelation, isRelationManager, mayChangeContext, mayDelete, mayWrite, setContext, setDecimalValue, setNodeManager, setXMLValue, toNodeManager, toRelation, toRelationManager, toString, validatepublic NodeChanger(Node node)
protected void change(String fieldName)
public void setValue(String fieldName, Object value)
Nodeint can be set using an
Integer.
This change will not be visible to the cloud until the commit method is
called.setValue in interface NodesetValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setValueWithoutProcess(String fieldName, Object value)
NodesetValueWithoutProcess in interface NodesetValueWithoutProcess in class NodeWrapperfieldName - name of fieldvalue - new value of the fieldpublic void setObjectValue(String fieldName, Object value)
NodesetObjectValue in interface NodesetObjectValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setBooleanValue(String fieldName, boolean value)
Nodeboolean.
This change will not be visible to the cloud until the commit method is
called.setBooleanValue in interface NodesetBooleanValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setNodeValue(String fieldName, Node value)
NodeNode.
This change will not be visible to the cloud until the commit method is
called.setNodeValue in interface NodesetNodeValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setIntValue(String fieldName, int value)
Nodeint.
This change will not be visible to the cloud until the commit method is
called.setIntValue in interface NodesetIntValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setFloatValue(String fieldName, float value)
Nodefloat.
This change will not be visible to the cloud until the commit method is
called.setFloatValue in interface NodesetFloatValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setDoubleValue(String fieldName, double value)
Nodedouble.
This change will not be visible to the cloud until the commit method is
called.setDoubleValue in interface NodesetDoubleValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setByteValue(String fieldName, byte[] value)
Nodebyte array.
This change will not be visible to the cloud until the commit method is
called.setByteValue in interface NodesetByteValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setInputStreamValue(String fieldName, InputStream value, long size)
Nodejava.io.InputStream.setInputStreamValue in interface NodesetInputStreamValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldsize - size of input streampublic void setLongValue(String fieldName, long value)
Nodelong.
This change will not be visible to the cloud until the commit method is
called.setLongValue in interface NodesetLongValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setStringValue(String fieldName, String value)
NodeString.
This change will not be visible to the cloud until the commit method is
called.setStringValue in interface NodesetStringValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setDateValue(String fieldName, Date value)
NodeDate.
This change will not be visible to the cloud until the commit method is
called.setDateValue in interface NodesetDateValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given fieldpublic void setListValue(String fieldName, List value)
NodeList.
This change will not be visible to the cloud until the commit method is
called.setListValue in interface NodesetListValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given field
// not yet workingpublic boolean isChangedByThis()
NodeWrapper.isChanged(java.lang.String) method reflects the isChanged status of the underlying core node.isChanged,
this one does that too, but only return true, if this instance performed this change.public void cancelThis()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}