Package helma.objectmodel
Interface INode
- All Superinterfaces:
INodeState
,IPathElement
- All Known Implementing Classes:
Node
,TransientNode
Interface that all Nodes implement. Currently, there are two implementations:
Transient nodes which only exist in memory, and persistent Nodes, which are
stored in a database (either the internal Object DB or an external relational DB).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a child node to this node.Add a child node to this node at the given positionvoid
Clear the cache node associated with this node.int
Returns the position of the child or -1.long
created()
Get the node's creation timestamp.createNode
(String name) Create a new named property with a node valuecreateNode
(String name, int where) Create a new unnamed child node at the given position.Get a property with the given name.boolean
getBoolean
(String name) Get a boolean property with the given name.Get the cache node associated with this node.Get a date property with the given name.Get the node'sDbMapping
.double
Get a float property with the given name.getID()
Get the node's ID.long
getInteger
(String name) Get an integer property with the given name.getJavaObject
(String name) Get a Java object property with the given name.getName()
Get the node's name.Get a node property with the given name.Get the node's parent node.getPath()
Get the node's path.Return the node's prototype name.int
getState()
Get the node's state flag.Get a string property with the given name.getSubnode
(String name) Get a named child node with the given name or id.getSubnodeAt
(int index) GEt an unnamed child node at the given positionGet the node's explicit subnode select clause if one was set, or nullGet an enumeration of this node's unnamed child nodesboolean
Returns true if this node is an unnamed node.long
Get the node's last modification timestamp.int
Get the number the node's direct child nodes.Get an enumeration over the node's properties.boolean
remove()
Remove this node from the database.void
removeNode
(INode node) Remove the given node from this node's child nodes.void
setBoolean
(String name, boolean value) Set the property with the given name to the given boolean value.void
Set the property with the given name to the given date value.void
setDbMapping
(DbMapping dbmap) Set the node'sDbMapping
.void
Set the property with the given name to the given float value.void
setInteger
(String name, long value) Set the property with the given name to the given integer value.void
setJavaObject
(String name, Object value) Set the property with the given name to the given Java object value.void
Set the node's name.void
Set the property with the given name to the given node value.void
setPrototype
(String prototype) Set the node's prototype name.void
setState
(int s) Set the node's state flag.void
Set the property with the given name to the given string value.void
setSubnodeRelation
(String clause) Set an explicit select clause for the node's subnodesvoid
Unset the property with the given name..Methods inherited from interface helma.framework.IPathElement
getChildElement, getElementName, getParentElement
-
Method Details
-
getID
String getID()Get the node's ID. -
getName
String getName()Get the node's name. -
setDbMapping
Set the node'sDbMapping
. -
getDbMapping
DbMapping getDbMapping()Get the node'sDbMapping
. -
getState
int getState()Get the node's state flag.- Returns:
- one of the constants defined in the
INodeState
interface.
-
setState
void setState(int s) Set the node's state flag.- Parameters:
s
- one of the constants defined in theINodeState
interface.
-
setName
Set the node's name. -
lastModified
long lastModified()Get the node's last modification timestamp. -
created
long created()Get the node's creation timestamp. -
isAnonymous
boolean isAnonymous()Returns true if this node is an unnamed node. -
getPrototype
String getPrototype()Return the node's prototype name.- Specified by:
getPrototype
in interfaceIPathElement
-
setPrototype
Set the node's prototype name. -
getCacheNode
INode getCacheNode()Get the cache node associated with this node. -
clearCacheNode
void clearCacheNode()Clear the cache node associated with this node. -
getPath
String getPath()Get the node's path. -
getParent
INode getParent()Get the node's parent node. -
setSubnodeRelation
Set an explicit select clause for the node's subnodes -
getSubnodeRelation
String getSubnodeRelation()Get the node's explicit subnode select clause if one was set, or null -
numberOfNodes
int numberOfNodes()Get the number the node's direct child nodes. -
addNode
Add a child node to this node. -
addNode
Add a child node to this node at the given position -
createNode
Create a new named property with a node value -
createNode
Create a new unnamed child node at the given position. -
getSubnodes
Enumeration getSubnodes()Get an enumeration of this node's unnamed child nodes -
getSubnode
Get a named child node with the given name or id. -
getSubnodeAt
GEt an unnamed child node at the given position -
contains
Returns the position of the child or -1. -
remove
boolean remove()Remove this node from the database. -
removeNode
Remove the given node from this node's child nodes. -
properties
Enumeration properties()Get an enumeration over the node's properties. -
get
Get a property with the given name. -
getString
Get a string property with the given name. -
getBoolean
Get a boolean property with the given name. -
getDate
Get a date property with the given name. -
getInteger
Get an integer property with the given name. -
getFloat
Get a float property with the given name. -
getNode
Get a node property with the given name. -
getJavaObject
Get a Java object property with the given name. -
setString
Set the property with the given name to the given string value. -
setBoolean
Set the property with the given name to the given boolean value. -
setDate
Set the property with the given name to the given date value. -
setInteger
Set the property with the given name to the given integer value. -
setFloat
Set the property with the given name to the given float value. -
setNode
Set the property with the given name to the given node value. -
setJavaObject
Set the property with the given name to the given Java object value. -
unset
Unset the property with the given name..
-