Package helma.objectmodel

# Interface INode

All Superinterfaces:
  `INodeState`, `IPathElement`

All Known Implementing Classes:
  `Node`, `TransientNode`

public interface INode extends INodeState, IPathElement
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

### Fields inherited from interface helma.objectmodel.INodeState

`CLEAN, DELETED, INVALID, MODIFIED, NEW, TRANSIENT, VIRTUAL`

## Method Summary

Modifier and Type
Method
Description
`INode`
`addNode(INode node)`
Add a child node to this node.
`INode`
`addNode(INode node, int where)`
Add a child node to this node at the given position
`void`
`clearCacheNode()`
Clear the cache node associated with this node.
`int`
`contains(INode node)`
Returns the position of the child or -1.
`long`
`created()`
Get the node's creation timestamp.
`INode`
`createNode(String name)`
Create a new named property with a node value
`INode`
`createNode(String name, int where)`
Create a new unnamed child node at the given position.
`IProperty`
`get(String name)`
Get a property with the given name.
`boolean`
`getBoolean(String name)`
Get a boolean property with the given name.
`INode`
`getCacheNode()`
Get the cache node associated with this node.
`Date`
`getDate(String name)`
Get a date property with the given name.
`DbMapping`
`getDbMapping()`
Get the node's `DbMapping`.
`double`
`getFloat(String name)`
Get a float property with the given name.
`String`
`getID()`
Get the node's ID.
`long`
`getInteger(String name)`
Get an integer property with the given name.
`Object`
`getJavaObject(String name)`
Get a Java object property with the given name.
`String`
`getName()`
Get the node's name.
`INode`
`getNode(String name)`
Get a node property with the given name.
`INode`
`getParent()`
Get the node's parent node.
`String`
`getPath()`
Get the node's path.
`String`
`getPrototype()`
Return the node's prototype name.
`int`
`getState()`
Get the node's state flag.
`String`
`getString(String name)`
Get a string property with the given name.
`INode`
`getSubnode(String name)`
Get a named child node with the given name or id.
`INode`
`getSubnodeAt(int index)`
GEt an unnamed child node at the given position
`String`
`getSubnodeRelation()`
Get the node's explicit subnode select clause if one was set, or null
`Enumeration`
`getSubnodes()`
Get an enumeration of this node's unnamed child nodes
`boolean`
`isAnonymous()`
Returns true if this node is an unnamed node.
`long`
`lastModified()`
Get the node's last modification timestamp.
`int`
`numberOfNodes()`
Get the number the node's direct child nodes.
`Enumeration`
`properties()`
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`
`setDate(String name, Date value)`
Set the property with the given name to the given date value.
`void`
`setDbMapping(DbMapping dbmap)`
Set the node's `DbMapping`.
`void`
`setFloat(String name, double value)`
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`
`setName(String name)`
Set the node's name.
`void`
`setNode(String name, INode value)`
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`
`setString(String name, String value)`
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 subnodes
`void`
`unset(String name)`
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

void setDbMapping(DbMapping dbmap)
Set the node's `DbMapping`.

### getDbMapping

DbMapping getDbMapping()
Get the node's `DbMapping`.

### 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 the `INodeState` interface.

### setName

void setName(String name)
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 interface `IPathElement`

### setPrototype

void setPrototype(String prototype)
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

void setSubnodeRelation(String clause)
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

INode addNode(INode node)
Add a child node to this node.

### addNode

INode addNode(INode node, int where)
Add a child node to this node at the given position

### createNode

INode createNode(String name)
Create a new named property with a node value

### createNode

INode createNode(String name, int where)
Create a new unnamed child node at the given position.

### getSubnodes

Enumeration getSubnodes()
Get an enumeration of this node's unnamed child nodes

### getSubnode

INode getSubnode(String name)
Get a named child node with the given name or id.

### getSubnodeAt

INode getSubnodeAt(int index)
GEt an unnamed child node at the given position

### contains

int contains(INode node)
Returns the position of the child or -1.

### remove

boolean remove()
Remove this node from the database.

### removeNode

void removeNode(INode node)
Remove the given node from this node's child nodes.

### properties

Enumeration properties()
Get an enumeration over the node's properties.

### get

IProperty get(String name)
Get a property with the given name.

### getString

String getString(String name)
Get a string property with the given name.

### getBoolean

boolean getBoolean(String name)
Get a boolean property with the given name.

### getDate

Date getDate(String name)
Get a date property with the given name.

### getInteger

long getInteger(String name)
Get an integer property with the given name.

### getFloat

double getFloat(String name)
Get a float property with the given name.

### getNode

INode getNode(String name)
Get a node property with the given name.

### getJavaObject

Object getJavaObject(String name)
Get a Java object property with the given name.

### setString

void setString(String name, String value)
Set the property with the given name to the given string value.

### setBoolean

void setBoolean(String name, boolean value)
Set the property with the given name to the given boolean value.

### setDate

void setDate(String name, Date value)
Set the property with the given name to the given date value.

### setInteger

void setInteger(String name, long value)
Set the property with the given name to the given integer value.

### setFloat

void setFloat(String name, double value)
Set the property with the given name to the given float value.

### setNode

void setNode(String name, INode value)
Set the property with the given name to the given node value.

### setJavaObject

void setJavaObject(String name, Object value)
Set the property with the given name to the given Java object value.

### unset

void unset(String name)
Unset the property with the given name..