Package helma.objectmodel.db

# Class SubnodeList

java.lang.Object
helma.objectmodel.db.SubnodeList

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `SegmentedSubnodeList`

public class SubnodeList extends Object implements Serializable
Container implementation for subnode collections.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected long`
`lastSubnodeChange`
`protected long`
`lastSubnodeFetch`
`protected List`
`list`
`protected Node`
`node`

## Constructor Summary

Constructors
Constructor
Description
`SubnodeList(Node node)`
Creates a new subnode list

## Method Summary

Modifier and Type
Method
Description
`void`
`add(int idx, NodeHandle handle)`
Adds the specified object to the list at the given position
`boolean`
`add(NodeHandle handle)`
Adds the specified object to this list performing custom ordering
`boolean`
`contains(Object object)`
`NodeHandle`
`get(int index)`
`protected long`
`getLastSubnodeChange()`
Compute a serial number indicating the last change in subnode collection
`Node`
`getNode(int index)`
`protected DbMapping`
`getSubnodeMapping()`
`protected Relation`
`getSubnodeRelation()`
`protected boolean`
`hasRelationalNodes()`
`int`
`indexOf(Object object)`
`protected void`
`markAsChanged()`
`protected void`
`prefetch(int start, int length)`
`Object`
`remove(int idx)`
remove the object specified by the given index-position
`boolean`
`remove(Object obj)`
remove the given Object from this List
`int`
`size()`
Return the size of the list.
`Object[]`
`toArray()`
`protected void`
`update()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### node

protected Node node

### list

protected List list

### lastSubnodeFetch

protected transient long lastSubnodeFetch

### lastSubnodeChange

protected transient long lastSubnodeChange

## Constructor Details

### SubnodeList

public SubnodeList(Node node)
Creates a new subnode list

Parameters:
  `node` - the node we belong to

## Method Details

### add

public boolean add(NodeHandle handle)
Adds the specified object to this list performing custom ordering

Parameters:
  `handle` - element to be inserted.

### add

public void add(int idx, NodeHandle handle)
Adds the specified object to the list at the given position

Parameters:
  `idx` - the index to insert the element at
  `handle` - the object to add

### get

public NodeHandle get(int index)

### getNode

public Node getNode(int index)

### contains

public boolean contains(Object object)

### indexOf

public int indexOf(Object object)

### remove

public Object remove(int idx)
remove the object specified by the given index-position

Parameters:
  `idx` - the index-position of the NodeHandle to remove

### remove

public boolean remove(Object obj)
remove the given Object from this List

Parameters:
  `obj` - the NodeHandle to remove

### toArray

public Object[] toArray()

### size

public int size()
Return the size of the list.

Returns:
  the list size

### update

protected void update()

### prefetch

protected void prefetch(int start, int length)

### getLastSubnodeChange

protected long getLastSubnodeChange()
Compute a serial number indicating the last change in subnode collection

Returns:
  a serial number that increases with each subnode change

### markAsChanged

protected void markAsChanged()

### hasRelationalNodes

protected boolean hasRelationalNodes()

### getSubnodeMapping

protected DbMapping getSubnodeMapping()

### getSubnodeRelation

protected Relation getSubnodeRelation()