Final Class: CollectionNodeSet

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

Since:
  • 1.0
Module:
  • ojcollectiontreedatasource

Note: This class is deprecated since 14.0.0. CollectionNodeSet has been deprecated with CollectionTreeDataSource.

QuickNav

Description

A CollectionNodeSet represents a collection of nodes. The CollectionNodeSet is an object returned by the success callback of the fetchChildren method on CollectionTreeDataSource.


Usage

For additional information visit:


Final classes in JET

Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.


Constructor

new CollectionNodeSet(parentKey, collection, models, treeDataSource, start, count)

A CollectionNodeSet represents a collection of nodes. The CollectionNodeSet is an object returned by the success callback of the fetchChildren method on CollectionTreeDataSource.
Parameters:
Name Type Description
parentKey any the key of the parent node
collection Collection the Collection associated with this NodeSet
models Array.<Model> a set of Model objects associated with this NodeSet
treeDataSource CollectionTreeDataSource the TreeDataSource associated with this NodeSet
start number the index of the first node in this NodeSet relative to its parent node
count number the number of nodes in this NodeSet

Methods

getChildNodeSet(index) : {CollectionNodeSet|null}

Gets the node set child of the specified index.
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the child node set
Returns:

the child node set representing the child collection.

Type
CollectionNodeSet | null

getCount : {number}

Gets the actual count of the result set.
Returns:

the actual count of the result set.

Type
number

getData(index) : {any}

Gets the data of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds.
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the data from.
Returns:

the data for the specified index. RowData should be returned for data that represents a row with a number of columns.

Type
any

getMetadata(index) : {Object}

Gets the metadata of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds. The metadata that the data source must return are: 1) key - Object, the key of the node/row. 2) leaf - boolean, true if it's a leaf, false otherwise. 3) depth? - number, the depth of the node/row. (or should the caller just calculate it?)
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the metadata from.
Returns:

the metadata object for the specific index.

Type
{key: *, leaf: boolean, depth: number}

getParent : {any}

Gets the parent key for this result set.
Returns:

the parent key for this result set.

Type
any

getStart : {number}

Gets the start index of the result set.
Returns:

the start index of the result set.

Type
number