Package helma.objectmodel.db
Class SubnodeList
java.lang.Object
helma.objectmodel.db.SubnodeList
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SegmentedSubnodeList
Container implementation for subnode collections.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int idx, NodeHandle handle) Adds the specified object to the list at the given positionboolean
add
(NodeHandle handle) Adds the specified object to this list performing custom orderingboolean
get
(int index) protected long
Compute a serial number indicating the last change in subnode collectiongetNode
(int index) protected DbMapping
protected Relation
protected boolean
int
protected void
protected void
prefetch
(int start, int length) remove
(int idx) remove the object specified by the given index-positionboolean
remove the given Object from this Listint
size()
Return the size of the list.Object[]
toArray()
protected void
update()
-
Field Details
-
node
-
list
-
lastSubnodeFetch
protected transient long lastSubnodeFetch -
lastSubnodeChange
protected transient long lastSubnodeChange
-
-
Constructor Details
-
SubnodeList
Creates a new subnode list- Parameters:
node
- the node we belong to
-
-
Method Details
-
add
Adds the specified object to this list performing custom ordering- Parameters:
handle
- element to be inserted.
-
add
Adds the specified object to the list at the given position- Parameters:
idx
- the index to insert the element athandle
- the object to add
-
get
-
getNode
-
contains
-
indexOf
-
remove
remove the object specified by the given index-position- Parameters:
idx
- the index-position of the NodeHandle to remove
-
remove
remove the given Object from this List- Parameters:
obj
- the NodeHandle to remove
-
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
-
getSubnodeRelation
-