Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Add

pentaho.type.action Add

The Add class describes the primitive operation of adding a new element to a list at a given index.

This type of change is always part of a pentaho.type.action.ListChangeset.

AMD Module

require(["pentaho/type/action/Add"], function(Add) { /* code goes here */ });

Extends

Constructor

Name Description
new Add(elem, index)

Creates an instance.

Members

Name Description
element :  pentaho.type.Element

Gets the element that is added to the list.

eventName
index :  number

Gets the list index at which the element is inserted.

transactionVersion

Methods

Name Description
_cancel(changeset)
Protected

Unregisters reference changes caused by this change.

_prepare(changeset)
Protected

Registers reference changes caused by this change.

_setTransactionVersion(txnVersion)
Protected

Sets the new transaction version of this change.

Constructor Details

new Add(elem, index)

Creates an instance.

Source: javascript/web/pentaho/type/action/Add.js, line 45

Parameters:
Name Default Value Summary
elem : pentaho.type.Element

The element to be added to the list.

index : number

The list index at which the element should be inserted.

Members Details

element:  pentaho.type.Element

Gets the element that is added to the list.

Source: javascript/web/pentaho/type/action/Add.js, line 53

eventName:

Source: javascript/web/pentaho/type/action/Change.js, line 40

Inherited From: pentaho.type.action.Change#eventName

index:  number

Gets the list index at which the element is inserted.

Source: javascript/web/pentaho/type/action/Add.js, line 61

transactionVersion:

Source: javascript/web/pentaho/type/action/PrimitiveChange.js, line 49

Inherited From: pentaho.type.action.PrimitiveChange#transactionVersion

Methods Details

_cancel(changeset)
Protected

Unregisters reference changes caused by this change.

Source: javascript/web/pentaho/type/action/PrimitiveChange.js, line 83

Inherited From: pentaho.type.action.PrimitiveChange#_cancel

Parameters:
Name Default Value Summary
changeset : pentaho.type.action.Changeset

The changeset.

_prepare(changeset)
Protected

Registers reference changes caused by this change.

Source: javascript/web/pentaho/type/action/PrimitiveChange.js, line 72

Inherited From: pentaho.type.action.PrimitiveChange#_prepare

Parameters:
Name Default Value Summary
changeset : pentaho.type.action.Changeset

The changeset.

_setTransactionVersion(txnVersion)
Protected

Sets the new transaction version of this change.

Source: javascript/web/pentaho/type/action/PrimitiveChange.js, line 60

Inherited From: pentaho.type.action.PrimitiveChange#_setTransactionVersion

Parameters:
Name Default Value Summary
txnVersion : number

The transaction version.