Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Add

pentaho.type.changes.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.changes.ListChangeset.

AMD Module

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

Extends

Constructor

Name Description
new Add(elem, index)

Creates an instance.

Members

Name Description
base : function
 
Protected

If a method has been overridden, then the base method provides access to the overridden method.

element : pentaho.type.Element

Gets the element that is added to the list.

index : number

Gets the list index at which the element is inserted.

type : string

Gets the type of change.

Methods

Name Description
_apply(target)
 
Protected

Applies any local primitive changes.

_cancelRefs(transaction, container)
 
Protected

Unregisters reference changes caused by the change.

_prepareRefs(transaction, container)
 
Protected

Register reference changes caused by the change.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

Constructor Details

new Add(elem, index)

Creates an instance.

Source: javascript/web/pentaho/type/changes/Add.js, line 44

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

base: function
 
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Can also be called from within a constructor function.

Source: javascript/web/pentaho/lang/Base.js, line 299

Inherited From: pentaho.lang.Base#base

element: pentaho.type.Element

Gets the element that is added to the list.

Source: javascript/web/pentaho/type/changes/Add.js, line 51

index: number

Gets the list index at which the element is inserted.

Source: javascript/web/pentaho/type/changes/Add.js, line 59

type: string

Gets the type of change.

Source: javascript/web/pentaho/type/changes/Add.js, line 69

Default Value: "add"

Overrides: pentaho.type.changes.PrimitiveChange#type

Methods Details

_apply(target)
 
Protected

Applies any local primitive changes.

Source: javascript/web/pentaho/type/changes/Change.js, line 50

Overrides: pentaho.type.changes.PrimitiveChange#_apply

Parameters:
Name Default Value Summary
target : pentaho.type.mixins.Container

The container to which changes are applied.

_cancelRefs(transaction, container)
 
Protected

Unregisters reference changes caused by the change.

Source: javascript/web/pentaho/type/changes/PrimitiveChange.js, line 71

Overrides: pentaho.type.changes.PrimitiveChange#_cancelRefs

Parameters:
Name Default Value Summary
transaction : pentaho.type.changes.Transaction

The ambient transaction, provided for performance.

container : pentaho.type.mixins.Container

The container instance.

See also:  pentaho.type.changes.ListChangeset#_clearChanges , pentaho.type.changes.ComplexChangeset#_clearChanges , pentaho.type.changes.ComplexChangeset.__setElement

_prepareRefs(transaction, container)
 
Protected

Register reference changes caused by the change.

Source: javascript/web/pentaho/type/changes/PrimitiveChange.js, line 56

Overrides: pentaho.type.changes.PrimitiveChange#_prepareRefs

Parameters:
Name Default Value Summary
transaction : pentaho.type.changes.Transaction

The ambient transaction, provided for performance.

container : pentaho.type.mixins.Container

The container instance.

See also:  pentaho.type.changes.ListChangeset.__addChange , pentaho.type.changes.ComplexChangeset.__setElement

extend(source, keyArgs) : Object

Extend an object with the properties of another.

Methods that are overridden are accessible through this.base.

This object is extended, but its class doesn't change.

Source: javascript/web/pentaho/lang/Base.js, line 1037

Inherited From: pentaho.lang.Base#extend

Parameters:
Name Default Value Summary
source : Object

The instance specification.

keyArgs : Object
 
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : Object
 
Optional

A map of property names to exclude from source.

Returns:
Name Description
Object

This object.