Class Index | File Index

Classes


Class Event.RowArray

Represents a light-weight object that is a list of rows. The array is physically implemented as a LinkedHashMap and provides a mechanism for indexing the rows by specifying either the Row Id or a column value as a key. Since it implements the hash set that supports #removeEldestEntry the array can also be used as an MRU cache by enabling the automatic removal behavior.
Defined in: <D:\Programs\Neeve\Projects\NeeveBuild\stjsapi/src/main/webapp/js\event\RowArray.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Event.RowArray(metaData)
Creates a new row-array
Method Summary
Method Attributes Method Name and Description
void 
addRow(row)
Adds the specified row to the row-array
void 
Clears the row array releasing it's row resources but not clearing the meta data.
boolean 
Returns true if the row-array contains the specified row, false otherwise
boolean 
existsKey(key)
Returns true if the row-array contains a row with the specified key, false otherwise
number 
Returns the row capacity of the row-array
String 
Returns the name of the index column.
Event.RowMetaData 
Gets the meta data for the row-array
Event.Row 
Returns the specified row
boolean 
Returns true if the row-array has a key index.
void 
init(rowSet)
Initializes the row-array by the specified row set.
void 
initFromMetaData(metaData)
Initializes the row-set stored in the event by the specified meta data.
boolean 
Returns true if the row-array works as a Most Recently Used cache and false otherwise
Event.Row 
Returns a new row fitting the row-array meta data
void 
Removes the first row
void 
Removes the specified row
void 
Enables or disables the ability of the row-array to function as a Most Recent Used cache.
number 
size()
Returns the row-array size
Class Detail
Event.RowArray(metaData)
Creates a new row-array
Parameters:
{Event.RowMetaData} metaData
The meta data describing a row in the row array to be created
Method Detail
addRow(row)
Adds the specified row to the row-array
Parameters:
{Event.Row} row
A row to be added

clear()
Clears the row array releasing it's row resources but not clearing the meta data.

{boolean} containsRow(row)
Returns true if the row-array contains the specified row, false otherwise
Parameters:
{Event.Row} row
A row to be checked
Returns:
true if the row-array contains the specified row, false otherwise

{boolean} existsKey(key)
Returns true if the row-array contains a row with the specified key, false otherwise
Parameters:
{Object} key
A row key to be checked
Returns:
true if the row-array contains a row with the specified key, false otherwise

{number} getCapacity()
Returns the row capacity of the row-array
Returns:
The row-array capacity

{String} getIndexColumnName()
Returns the name of the index column. If one is not set it returns the row_id column name.
Returns:
The name of the index column

{Event.RowMetaData} getMetaData()
Gets the meta data for the row-array
Returns:
The meta data of the row-array

{Event.Row} getRowByKey(key)
Returns the specified row
Parameters:
{Object} key
A key of the row to be returned
Returns:
The row which has the specified key

{boolean} hasKeyIndex()
Returns true if the row-array has a key index. This holds true if either the user has set an index, or if Row Id capability has been enabled.
Returns:
True if the row-array has a key index and false otherwise.

init(rowSet)
Initializes the row-array by the specified row set.
Parameters:
{Event.RowSet} rowSet
The row set for initializing of the row-array

initFromMetaData(metaData)
Initializes the row-set stored in the event by the specified meta data.
Parameters:
{Event.RowMetaData} metaData
The meta data for initializing of the stored row-array

{boolean} isMRUEnabled()
Returns true if the row-array works as a Most Recently Used cache and false otherwise
Returns:
true if the row-array works as a Most Recently Used cache, false otherwise

{Event.Row} newRow()
Returns a new row fitting the row-array meta data
Returns:
A new row fitting the row-array meta data

removeRow()
Removes the first row

removeRowByKey(key)
Removes the specified row
Parameters:
{Object} key
A key of the row to be removed

setMRUEnabled(cache)
Enables or disables the ability of the row-array to function as a Most Recent Used cache. When enabled and Capacity is reached the array will automatically remove the least-recent row in order to make room for the new element.
Parameters:
{boolean} cache
A flag specified true to enable MRU cache and false to disable

{number} size()
Returns the row-array size
Returns:
The size of the row-array

Copyright © 2015-2021 StreamScape Technologies. All rights reserved.