|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.module.core.MMObjectNode
org.mmbase.module.core.VirtualNode
public class VirtualNode
VirtualNode is a representation of a virtual objectnode. Virtual Object nodes are nodes that are not stored in a databasetable. Note that a temporary node is not virtual. This class captures a number of methods that would normally require datbase access, such as obtaining relations or determining age of a node.
| Field Summary |
|---|
| Fields inherited from class org.mmbase.module.core.MMObjectNode |
|---|
aliases, initializing, isNew, oldBuilder, parent, sequence, VALUE_SHORTED, values |
| Constructor Summary | |
|---|---|
VirtualNode(Map<String,Object> values)
Alternate constructor, to create a node with the values given. |
|
VirtualNode(MMObjectBuilder parent)
Main constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
checkFieldExistance(String fieldName)
Overrides to no throw exception on non-existing fields |
boolean |
commit()
commit : commits the node to the database or other storage system. |
int |
getAge()
Returns the node's age A virtual node is always new (0) |
int |
getOType()
Retrieve an object's object type. |
int |
getRelationCount()
Returns the number of relations of this node. |
int |
getRelationCount(String wantedtype)
Return the number of relations of this node, filtered on a specified type. |
Enumeration<MMObjectNode> |
getRelations()
Return the relations of this node. |
boolean |
hasRelations()
Returns whether this node has relations. |
int |
insert(String userName)
Insert is not implemented on a virtual node. |
boolean |
isVirtual()
Determines whether the node is virtual. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualNode(MMObjectBuilder parent)
parent - the node's parentpublic VirtualNode(Map<String,Object> values)
| Method Detail |
|---|
public boolean isVirtual()
MMObjectNode
isVirtual in class MMObjectNodeprotected boolean checkFieldExistance(String fieldName)
checkFieldExistance in class MMObjectNodetrue if field exists and may be used.public boolean commit()
commit in class MMObjectNodefalsepublic int insert(String userName)
insert in class MMObjectNodeuserName - the name of the user who inserts the node. This value is ignored
UnsupportedOperationExceptionpublic boolean hasRelations()
hasRelations in class MMObjectNodefalsepublic Enumeration<MMObjectNode> getRelations()
getRelations in class MMObjectNodeEnumerationpublic int getRelationCount()
getRelationCount in class MMObjectNodepublic int getRelationCount(String wantedtype)
getRelationCount in class MMObjectNodewantedtype - the 'type' of related nodes (NOT the relations!).
public int getAge()
getAge in class MMObjectNodepublic int getOType()
MMObjectNode
getOType in class MMObjectNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||