|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.NodeWrapper
org.mmbase.bridge.util.NodeChanger
public class NodeChanger
Wraps another Node, and adds '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.
| Field Summary | |
|---|---|
protected Map<String,Object> |
originalValues
|
| Fields inherited from class org.mmbase.bridge.util.NodeWrapper |
|---|
node |
| Fields inherited from interface org.mmbase.bridge.Node |
|---|
CLOUD_COMMITNODE_KEY |
| Constructor Summary | |
|---|---|
NodeChanger(Node node)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Object> originalValues
| Constructor Detail |
|---|
public NodeChanger(Node node)
| Method Detail |
|---|
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 field
public void setValueWithoutProcess(String fieldName,
Object value)
Node
setValueWithoutProcess in interface NodesetValueWithoutProcess in class NodeWrapperfieldName - name of fieldvalue - new value of the field
public void setObjectValue(String fieldName,
Object value)
Node
setObjectValue in interface NodesetObjectValue in class NodeWrapperfieldName - the name of the field to be updatedvalue - the new value for the given field
public 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 field
public 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 field
public 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 field
public 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 field
public 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 field
public 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 field
public 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 stream
public 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 field
public 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 field
public 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 field
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||