Source: src/main/javascript/oracle/oj/ojrowexpander/EmptyNodeSet.js

Oracle® JavaScript Extension Toolkit (JET)
1.1.2

E65298-01

/**
 * Copyright (c) 2014, Oracle and/or its affiliates.
 * All rights reserved.
 */
 
/**
 * Convenient class that represents an empty node set
 * @param {Object} parent the parent key
 * @param {number} start the start index
 * @constructor
 * @export
 */
oj.EmptyNodeSet = function(parent, start)
{
    this.m_parent = parent;
    this.m_start = start;
};

/**
 * Gets the parent
 * @return {Object} the key of the parent.
 * @export
 */
oj.EmptyNodeSet.prototype.getParent = function()
{
    return this.m_parent;
};

/**
 * Gets the start index of the result set.  
 * @return {number} the start index of the result set.  
 * @export
 */
oj.EmptyNodeSet.prototype.getStart = function()
{
    return this.m_start;
};

/**
 * Gets the actual count of the result set.  
 * @return {number} the actual count of the result set.  
 * @export
 */
oj.EmptyNodeSet.prototype.getCount = function()
{
    return 0;
};

/**
 * 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. 
 * @param {number} index the index of the node/row in which we want to retrieve the data from.  
 * @return {Object} the data for the specified index.
 * @export
 */
oj.EmptyNodeSet.prototype.getData = function(index)
{
    return null;
};

/**
 * 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) state - state of the node, valid values are 'expanded', 'collapsed', 'leaf'. 
 *  3) depth - number, the depth of the node/row. 
 * @param {number} index the index of the node/row in which we want to retrieve the metadata from.  
 * @return {Object} the metadata object for the specific index.
 * @export
 */
oj.EmptyNodeSet.prototype.getMetadata = function(index)
{
    return null;
};