| java.lang.Object org.mmbase.module.core.MMObjectNode
All known Subclasses: org.mmbase.module.core.VirtualNode,
MMObjectNode | public class MMObjectNode implements org.mmbase.util.SizeMeasurable,java.io.Serializable(Code) | | MMObjectNode is the core of the MMBase system.
This class is what its all about, because the instances of this class hold the content we are using.
All active Nodes with data and relations are MMObjectNodes and make up the
object world that is MMBase (Creating, searching, removing is done by the node's parent,
which is a class extended from MMObjectBuilder)
author: Daniel Ockeloen author: Pierre van Rooden author: Eduard Witteveen author: Michiel Meeuwissen author: Ernst Bunders version: $Id: MMObjectNode.java,v 1.213 2008/02/03 17:33:57 nklasens Exp $ |
Field Summary | |
final public static String | VALUE_SHORTED Large fields (blobs) are loaded 'lazily', so only on explicit request. | protected boolean | initializing Determines whether the node is being initialized (typically when it is loaded from the database). | protected boolean | isNew If true , the node is a new node, which is not (yet) stored in storage. | protected MMObjectBuilder | parent Pointer to the parent builder that is responsible for this node. | public Hashtable<String, MMObjectNode> | properties Holds the 'extra' name-value pairs (the node's properties)
which are retrieved from the 'properties' table. | protected Map<String, Object> | values Holds the name - value pairs of this node (the node's fields). |
Method Summary | |
public void | cancel() Undo changes made to the node. | protected boolean | checkFieldExistance(String fieldName) | public boolean | clearChanged() Clear the 'signal' Vector with the changed keys since last commit/insert. | public boolean | commit() Commit the node to the database or other storage system.
This can only be done on a existing (inserted) node. | public boolean | commit(UserContext user) | public Parameters | createParameters(String functionName) | public boolean | defaultEquals(MMObjectNode n) | String | defaultToString() | public void | delPropertiesCache() Deletes the propertie cache for this node. | public void | delRelationsCache() Delete the relation cache for this node. | public static void | delRelationsCache(Integer number) Delete the relation cache for this node. | public boolean | equals(Object o) | public void | finish() | public int | getAge() Return the age of the node, determined using the daymarks builder. | public Enumeration<MMObjectNode> | getAllRelations() Return all the relations of this node. | public boolean | getBooleanValue(String fieldName) Get a value of a certain field.
The value is returned as an boolean value.
If the actual value is numeric, this call returns true
if the value is a positive, non-zero, value. | public MMObjectBuilder | getBuilder() Returns the actual builder of the node.
Note that it is possible that, due to optimization, a node is currently associated with
another (parent) builder, i.e. | public int | getByteSize() | public int | getByteSize(SizeOf sizeof) | public byte[] | getByteValue(String fieldName) Get a binary value of a certain field. | public Set<String> | getChanged() Return the names of all persistent fields that were changed.
Note that this is a direct reference. | public String | getContext(UserContext user) | public int | getDBState(String fieldName) Returns the DBState of a field. | public int | getDBType(String fieldName) Returns the DBType of a field. | public Date | getDateValue(String fieldName) Get a value of a certain field.
The value is returned as a Date value. | public double | getDoubleValue(String fieldName) Get a value of a certain field.
The value is returned as a double value. | public float | getFloatValue(String fieldName) Get a value of a certain field.
The value is returned as a float value. | public Function> | getFunction(String functionName) | public Object | getFunctionValue(String functionName, List> parameters) | public Collection<Function<?>> | getFunctions() | public String | getGUIIndicator() Return the GUI indicator for this node. | public InputStream | getInputStreamValue(String fieldName) | public int | getIntValue(String fieldName) Get a value of a certain field.
The value is returned as an int value. | public Integer | getIntegerValue(String fieldName) Get a value of a certain field.
The value is returned as an Integer value. | public List | getListValue(String fieldName) Get a value of a certain field. | public long | getLongValue(String fieldName) Get a value of a certain field. | public String | getName() | public MMObjectNode | getNodeValue(String fieldName) Get a value of a certain field.
The value is returned as an MMObjectNode.
If the field contains an Numeric value, the method
tries to obtrain the object with that number.
If it is a String, the method tries to obtain the object with
that alias. | public int | getNumber() Retrieve an object's number. | public int | getOType() Retrieve an object's object type. | public Map<String, Object> | getOldValues() | public Set<String> | getPossibleContexts(UserContext user) | public Hashtable<String, MMObjectNode> | getProperties() Return a the properties for this node. | public MMObjectNode | getProperty(String key) Returns a specified property of this node. | public Vector<MMObjectNode> | getRelatedNodes() Get all related nodes. | public Vector<MMObjectNode> | getRelatedNodes(String type) Get the related nodes of a certain type. | public Vector<MMObjectNode> | getRelatedNodes(String type, int search_type) If you query from this_node_type(type) (typex, insrel, typey where typex == typey) {
if the insrel table is directional, use the multirelations.SEARCH_BOTH
if the insrel table is not directional, use the multirelations.SEARCH_SOURCE + multirelations.SEARCH_DESTINATION
}
Otherwise the SEARCH_BOTH will result in an OR on insrel which will never return in
(huge) databases. | public Vector<MMObjectNode> | getRelatedNodes(String type, String role, int search_type) If you query from this_node_type(type) (typex, insrel, typey where typex == typey) {
if the insrel table is directional, use the multirelations.SEARCH_BOTH
if the insrel table is not directional, use the multirelations.SEARCH_SOURCE + multirelations.SEARCH_DESTINATION
}
Otherwise the SEARCH_BOTH will result in an OR on insrel which will never return in
(huge) databases. | public int | getRelationCount() Returns the number of relations of this node. | public int | getRelationCount(String wt) Return the number of relations of this node, filtered on a specified type.
Parameters: wt - the 'type' of related nodes (NOT the relations!). | protected List<MMObjectNode> | getRelationNodes() | public Enumeration<MMObjectNode> | getRelations() Return the relations of this node. | public Enumeration<MMObjectNode> | getRelations(int otype) Return the relations of this node, filtered on a specified type.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
Parameters: otype - the 'type' of relations to return. | public Enumeration<MMObjectNode> | getRelations(String wantedtype) Return the relations of this node, filtered on a specified type.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
Parameters: wantedtype - the 'type' of relations to return. | public long | getSize(String fieldName) Returns the size (in byte) of the given field. | public String | getStringValue(String fieldName) Get a value of a certain field. | public Object | getValue(String fieldName) Get a value of a certain field. | public Map<String, Object> | getValues() | public Document | getXMLValue(String fieldName) Returns the value of the specified field as a dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. | public boolean | hasRelations() Returns whether this node has relations. | public int | hashCode() | public int | insert(String userName) Insert this node into the storage
Parameters: userName - the name of the user who inserts the node. | public int | insert(UserContext user) Insert this node into the database or other storage system. | public boolean | isChanged() Tests whether one of the values of this node was changed since the last commit/insert. | public boolean | isNew() If a node is still 'new' you must persistify it with
MMObjectNode.insert , and otherwise with
MMObjectNode.commit . | public boolean | isNull(String fieldName) | public boolean | isVirtual() Determines whether the node is virtual. | public void | putProperty(MMObjectNode node) Sets a specified property for this node. | public void | remove(UserContext user) | public void | removeRelations() Remove the relations of the node. | public Object | retrieveValue(String fieldName) Retrieves a value from the values hashtable. | public boolean | sendFieldChangeSignal(String fieldName) Sends a field-changed signal.
Parameters: fieldName - the name of the changed field. | public void | setAlias(String alias) Sets the node's alias.
The code only sets a (memory) property, it does not actually add the alias to the database.
Only works for uninserted Nodes. | public void | setContext(UserContext user, String context, boolean now) | public void | setSize(String fieldName, long size) Sets the size (in byte) of the given field. | public boolean | setValue(String fieldName, Object fieldValue) Sets a key/value pair in the main values of this node. | public void | start() | public void | storeValue(String fieldName, Object fieldValue) Stores a value in the values hashtable. | public void | testValidData() Tests whether the data in a node is valid (throws an exception if this is not the case). | public String | toString() Returns the core of this node in a string. | protected Document | toXML(Object value, String fieldName) | void | useAliases() Returns the node's alias. |
VALUE_SHORTED | final public static String VALUE_SHORTED(Code) | | Large fields (blobs) are loaded 'lazily', so only on explicit request. Until the first exlicit request this value is stored in such fields.
It can be set back into the field with
MMObjectNode.storeValue , to unload the field again.
since: MMBase-1.7.4 |
initializing | protected boolean initializing(Code) | | Determines whether the node is being initialized (typically when it is loaded from the database).
Use
MMObjectNode.start to start initializing, use
MMObjectNode.finish to end.
since: MMBase-1.7 |
isNew | protected boolean isNew(Code) | | If true , the node is a new node, which is not (yet) stored in storage.
|
parent | protected MMObjectBuilder parent(Code) | | Pointer to the parent builder that is responsible for this node.
Note: this may on occasion (due to optimization) duffer for the node's original builder.
Use
MMObjectNode.getBuilder instead.
|
properties | public Hashtable<String, MMObjectNode> properties(Code) | | Holds the 'extra' name-value pairs (the node's properties)
which are retrieved from the 'properties' table.
|
values | protected Map<String, Object> values(Code) | | Holds the name - value pairs of this node (the node's fields).
Most nodes will have a 'number' and an 'otype' field, and fields which will differ by builder.
This collection should not be directly queried or changed -
use the SetValue and getXXXValue methods instead.
It should then be made private, and methods that change the map (storeValue) be made synchronized.
Note: To avoid synchronisation conflicts, we can't really change the type until the property is made private.
|
MMObjectNode | public MMObjectNode(MMObjectBuilder parent)(Code) | | Default Main constructor, creates a node that is new and not (yet) in storage.
Parameters: parent - the node's parent, an instance of the node's builder. throws: IllegalArgumentException - If parent is null |
MMObjectNode | public MMObjectNode(MMObjectBuilder parent, boolean isNew)(Code) | | Main constructor.
Parameters: parent - the node's parent, an instance of the node's builder. Parameters: isNew - if the node is a newly created node throws: IllegalArgumentException - If parent is null |
cancel | public void cancel()(Code) | | Undo changes made to the node.
since: MMBase-1.8 |
checkFieldExistance | protected boolean checkFieldExistance(String fieldName)(Code) | | true if field exists and may be used. since: MMBase-1.8 |
clearChanged | public boolean clearChanged()(Code) | | Clear the 'signal' Vector with the changed keys since last commit/insert.
Marks the node as 'unchanged'.
Does not affect the values of the fields, nor does it commit the node.
always true |
commit | public boolean commit()(Code) | | Commit the node to the database or other storage system.
This can only be done on a existing (inserted) node. It will use the
changed Vector as its base of what to commit/change.
true if the commit was succesfull, false is it failed |
commit | public boolean commit(UserContext user)(Code) | | Commit this node to the storage
Parameters: user - the user who commits the node.Used to set security-related information true if succesful since: MMBase-1.7 |
defaultToString | String defaultToString()(Code) | | since: MMBase-1.6.2 |
delPropertiesCache | public void delPropertiesCache()(Code) | | Deletes the propertie cache for this node.
Forces a reload of the properties on next use.
|
delRelationsCache | public void delRelationsCache()(Code) | | Delete the relation cache for this node.
This means it will be reloaded from the database/storage on next use.
|
delRelationsCache | public static void delRelationsCache(Integer number)(Code) | | Delete the relation cache for this node.
This means it will be reloaded from the database/storage on next use.
Parameters: number - nodenumber |
equals | public boolean equals(Object o)(Code) | | since: MMBase-1.6.2 |
finish | public void finish()(Code) | | Finish the loading of a node
since: MMBase-1.7 |
getAge | public int getAge()(Code) | | Return the age of the node, determined using the daymarks builder.
the age in days, or 0 if unknown (daymarks builder not present) |
getAllRelations | public Enumeration<MMObjectNode> getAllRelations()(Code) | | Return all the relations of this node.
Use only to delete the relations of a node.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
An Enumeration containing the nodes |
getBooleanValue | public boolean getBooleanValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as an boolean value.
If the actual value is numeric, this call returns true
if the value is a positive, non-zero, value. In other words, values '0'
and '-1' are concidered false .
If the value is a string, this call returns true if
the value is "true" or "yes" (case-insensitive).
In all other cases (including calling byte fields), false
is returned.
Note that there is currently no basic MMBase boolean type, but some
excecuteFunction calls may return a Boolean result.
Parameters: fieldName - the name of the field who's data to return the field's value as an int |
getBuilder | public MMObjectBuilder getBuilder()(Code) | | Returns the actual builder of the node.
Note that it is possible that, due to optimization, a node is currently associated with
another (parent) builder, i.e. a posrel node may be associated with a insrel builder.
This method returns the actual builder.
The node may miss vital information (not retrieved from the database) to act as a node of such
a builder - if you need actual status you need to reload it.
since: MMBase-1.6 the builder of this node |
getByteSize | public int getByteSize()(Code) | | |
getByteValue | public byte[] getByteValue(String fieldName)(Code) | | Get a binary value of a certain field.
Parameters: fieldName - the name of the field who's data to return the field's value as an byte [] (binary/blob field) |
getChanged | public Set<String> getChanged()(Code) | | Return the names of all persistent fields that were changed.
Note that this is a direct reference. Changes (i.e. clearing the vector) will affect the node's status.
A Set containing Strings. The set is modifiable, and synchronized. Don't modify it though. |
getContext | public String getContext(UserContext user)(Code) | | Returns the security context for this node
Parameters: user - the user who requests the context of the node. since: MMBase-1.7.1 |
getDBState | public int getDBState(String fieldName)(Code) | | Returns the DBState of a field.
Parameters: fieldName - the name of the field who's state to return the field's DBState |
getDBType | public int getDBType(String fieldName)(Code) | | Returns the DBType of a field.
Parameters: fieldName - the name of the field which' type to return the field's DBType |
getDateValue | public Date getDateValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as a Date value. Values of numeric fields are converted as if they were
time in seconds since 1/1/1970.
String fields are parsed to a date, if possible.
All remaining field values return -1.
since: MMBase-1.8 Parameters: fieldName - the name of the field who's data to return the field's value as a Date |
getDoubleValue | public double getDoubleValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as a double value. Values of non-double, numeric fields are converted if possible.
Boolean fields return 0 for false, 1 for true.
String fields are parsed to a number, if possible.
All remaining field values return -1.
Parameters: fieldName - the name of the field who's data to return the field's value as a double |
getFloatValue | public float getFloatValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as a float value. Values of non-float, numeric fields are converted if possible.
Boolean fields return 0 for false, 1 for true.
String fields are parsed to a number, if possible.
All remaining field values return -1.
Parameters: fieldName - the name of the field who's data to return the field's value as a float |
getFunctionValue | public Object getFunctionValue(String functionName, List> parameters)(Code) | | XXX: return type of this method make it impossible to make MMObjectNode implements Node, perhaps it needs change
since: MMBase-1.6 |
getGUIIndicator | public String getGUIIndicator()(Code) | | Return the GUI indicator for this node.
The GUI indicator is a string that represents the contents of this node.
By default it is the string-representation of the first non-system field of the node.
Individual builders can alter this behavior.
the GUI iddicator as a String |
getIntValue | public int getIntValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as an int value. Values of non-int, numeric fields are converted if possible.
Booelan fields return 0 for false, 1 for true.
String fields are parsed to a number, if possible.
If a value is an MMObjectNode, its numberfield is returned.
All remaining field values return -1.
Parameters: fieldName - the name of the field who's data to return the field's value as an int |
getIntegerValue | public Integer getIntegerValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as an Integer value. Values of non-Integer, numeric fields are converted if possible.
Boolean fields return 0 for false, 1 for true.
String fields are parsed to a number, if possible.
All remaining field values return -1.
Parameters: fieldName - the name of the field who's data to return the field's value as an Integer |
getListValue | public List getListValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as a List value.
Strings are treated as comma-seperated value lists, and split into their component parts.
Values of other fields are returned as Lists of one object.
since: MMBase-1.8 Parameters: fieldName - the name of the field who's data to return the field's value as a List |
getLongValue | public long getLongValue(String fieldName)(Code) | | Get a value of a certain field.
See Also: MMObjectNode.getValue See Also: Casting.toLong Parameters: fieldName - the name of the field who's data to return the field's value as a long |
getName | public String getName()(Code) | | Return the buildername of this node
the builder table name |
getNodeValue | public MMObjectNode getNodeValue(String fieldName)(Code) | | Get a value of a certain field.
The value is returned as an MMObjectNode.
If the field contains an Numeric value, the method
tries to obtrain the object with that number.
If it is a String, the method tries to obtain the object with
that alias. The only other possible values are those created by
certain virtual fields.
All remaining situations return null .
Parameters: fieldName - the name of the field who's data to return the field's value as an int |
getNumber | public int getNumber()(Code) | | Retrieve an object's number.
In case of a new node that is not committed, this will return -1.
the number of the node |
getOType | public int getOType()(Code) | | Retrieve an object's object type.
This is a number (an index in the typedef builer), rather than a name.
the object type number of the node |
getPossibleContexts | public Set<String> getPossibleContexts(UserContext user)(Code) | | Returns the possible new security contexts for this node
Parameters: user - the user who requests the context of the node. since: MMBase-1.7.1 |
getProperty | public MMObjectNode getProperty(String key)(Code) | | Returns a specified property of this node.
Parameters: key - the name of the property to retrieve the property object as a MMObjectNode |
getRelatedNodes | public Vector<MMObjectNode> getRelatedNodes()(Code) | | Get all related nodes. The returned nodes are not the
nodes directly attached to this node (the relation nodes) but the nodes
attached to the relation nodes of this node.
XXX: return type of this method make it impossible to make MMObjectNode implements Node, perhaps it needs change
a Vector containing MMObjectNode s |
getRelatedNodes | public Vector<MMObjectNode> getRelatedNodes(String type)(Code) | | Get the related nodes of a certain type. The returned nodes are not the
nodes directly attached to this node (the relation nodes) but the nodes
attached to the relation nodes of this
XXX: return type of this method make it impossible to make MMObjectNode implements Node, perhaps it needs change
Parameters: type - the type of objects to be returned a Vector containing MMObjectNode s |
getRelatedNodes | public Vector<MMObjectNode> getRelatedNodes(String type, int search_type)(Code) | | If you query from this_node_type(type) (typex, insrel, typey where typex == typey) {
if the insrel table is directional, use the multirelations.SEARCH_BOTH
if the insrel table is not directional, use the multirelations.SEARCH_SOURCE + multirelations.SEARCH_DESTINATION
}
Otherwise the SEARCH_BOTH will result in an OR on insrel which will never return in
(huge) databases.
Parameters: type - the type of teh realted node to return Parameters: search_type - the type of directionality to use since: MMBase-1.6.3 |
getRelatedNodes | public Vector<MMObjectNode> getRelatedNodes(String type, String role, int search_type)(Code) | | If you query from this_node_type(type) (typex, insrel, typey where typex == typey) {
if the insrel table is directional, use the multirelations.SEARCH_BOTH
if the insrel table is not directional, use the multirelations.SEARCH_SOURCE + multirelations.SEARCH_DESTINATION
}
Otherwise the SEARCH_BOTH will result in an OR on insrel which will never return in
(huge) databases.
Parameters: type - the type of teh realted node to return Parameters: role - the role of the relation (null if no role specified) Parameters: search_type - the type of directionality to use since: MMBase-1.6.3 |
getRelationCount | public int getRelationCount()(Code) | | Returns the number of relations of this node.
An int indicating the number of nodes found |
getRelationCount | public int getRelationCount(String wt)(Code) | | Return the number of relations of this node, filtered on a specified type.
Parameters: wt - the 'type' of related nodes (NOT the relations!). An int indicating the number of nodes found |
getRelations | public Enumeration<MMObjectNode> getRelations()(Code) | | Return the relations of this node.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
XXX: return type of this method makes it impossible to make MMObjectNode implements Node, perhaps it needs change
An Enumeration containing the nodes |
getRelations | public Enumeration<MMObjectNode> getRelations(int otype)(Code) | | Return the relations of this node, filtered on a specified type.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
Parameters: otype - the 'type' of relations to return. The type identifies a relation (InsRel-derived) builder, not a reldef object. An Enumeration containing the nodes |
getRelations | public Enumeration<MMObjectNode> getRelations(String wantedtype)(Code) | | Return the relations of this node, filtered on a specified type.
Note that this returns the nodes describing the relation - not the nodes 'related to'.
Parameters: wantedtype - the 'type' of relations to return. The type identifies a relation (InsRel-derived) builder, not a reldef object. An Enumeration containing the nodes |
getSize | public long getSize(String fieldName)(Code) | | Returns the size (in byte) of the given field. This is mainly targeted at fields of the type
byte array. For other fields this method will return something reasonable, but it is as yet
not well defined what...
since: MMBase-1.8 |
getStringValue | public String getStringValue(String fieldName)(Code) | | Get a value of a certain field. The value is returned as a
String. Non-string values are automatically converted to
String. 'null' is converted to an empty string.
Parameters: fieldName - the name of the field who's data to return the field's value as a String |
getValue | public Object getValue(String fieldName)(Code) | | Get a value of a certain field.
Parameters: fieldName - the name of the field who's data to return the field's value as an Object |
getXMLValue | public Document getXMLValue(String fieldName)(Code) | | Returns the value of the specified field as a dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
If the value cannot be converted, this method returns null
Parameters: fieldName - the name of the field to be returned the value of the specified field as a DOM Element or null throws: IllegalArgumentException - if the value cannot be converted. since: MMBase-1.6 |
hasRelations | public boolean hasRelations()(Code) | | Returns whether this node has relations.
This includes unidirection relations which would otherwise not be counted.
true if any relations exist, false otherwise. |
hashCode | public int hashCode()(Code) | | since: MMBase-1.6.2 |
insert | public int insert(String userName)(Code) | | Insert this node into the storage
Parameters: userName - the name of the user who inserts the node. This value is ignored the new node key (number field), or -1 if the insert failed |
insert | public int insert(UserContext user)(Code) | | Insert this node into the database or other storage system.
Parameters: user - the user who inserts the node.Used to set security-related information the new node key (number field), or -1 if the insert failed since: MMBase-1.7 |
isChanged | public boolean isChanged()(Code) | | Tests whether one of the values of this node was changed since the last commit/insert.
true if changes have been made, false otherwise |
isNull | public boolean isNull(String fieldName)(Code) | | since: MMBase-1.8 |
isVirtual | public boolean isVirtual()(Code) | | Determines whether the node is virtual.
A virtual node is not persistent (that is, stored in a database table).
|
putProperty | public void putProperty(MMObjectNode node)(Code) | | Sets a specified property for this node.
This method does not commit anything - it merely updates the node's propertylist.
Parameters: node - the property object as a MMObjectNode |
remove | public void remove(UserContext user)(Code) | | Remove this node from the storage
Parameters: user - the user who removes the node.Used to set security-related information since: MMBase-1.7 |
removeRelations | public void removeRelations()(Code) | | Remove the relations of the node.
|
retrieveValue | public Object retrieveValue(String fieldName)(Code) | | Retrieves a value from the values hashtable.
This is a low-level method that circumvents typechecking and the triggers of extended classes.
You should normally call
MMObjectNode.getValue to load fields.
Parameters: fieldName - the name of the field to change the value of the field |
sendFieldChangeSignal | public boolean sendFieldChangeSignal(String fieldName)(Code) | | Sends a field-changed signal.
Parameters: fieldName - the name of the changed field. always true |
setAlias | public void setAlias(String alias)(Code) | | Sets the node's alias.
The code only sets a (memory) property, it does not actually add the alias to the database.
Only works for uninserted Nodes. So this is actually only used for application import.
No need to use this. Use
MMObjectBuilder.createAlias .
|
setContext | public void setContext(UserContext user, String context, boolean now)(Code) | | Sets the security context for this node
Parameters: user - the user who changes the context of the node. Parameters: context - the new context Parameters: now - if true , the context is changed instantly, otherwise it is changedafter the node is send to storage. since: MMBase-1.7 |
setSize | public void setSize(String fieldName, long size)(Code) | | Sets the size (in byte) of the given field. This is meant for byte-array fields, which you
fill using an InputStream.
See Also: MMObjectNode.getSize(String) since: MMBase-1.8 |
setValue | public boolean setValue(String fieldName, Object fieldValue)(Code) | | Sets a key/value pair in the main values of this node.
Note that if this node is a node in cache, the changes are immediately visible to
everyone, even if the changes are not committed.
The fieldName is added to the (public) 'changed' vector to track changes.
Parameters: fieldName - the name of the field to change Parameters: fieldValue - the value to assign true When the field was changed, false otherwise. |
start | public void start()(Code) | | Start the loading of a node
since: MMBase-1.7 |
storeValue | public void storeValue(String fieldName, Object fieldValue)(Code) | | Stores a value in the values hashtable.
This is a low-level method that circumvents typechecking and the triggers of extended classes.
You should normally call
MMObjectNode.setValue to change fields.
Parameters: fieldName - the name of the field to change Parameters: fieldValue - the value to assign |
toString | public String toString()(Code) | | Returns the core of this node in a string.
Used for debugging.
For data exchange use toXML() and getDTD().
the contents of the node as a string. |
useAliases | void useAliases()(Code) | | Returns the node's alias.
Does not support multiple aliases.
|
|
|