Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Remove

pentaho.type.action. Remove

The Remove class describes the primitive operation that removes a set of contiguous elements from a list.

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

AMD Module

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

Extends

Constructor

Name Description
new Remove(elems, index)

Creates an instance.

Members

Name Description
id
Static
elements : Array.<pentaho.type.Element>

Gets the elements that are removed from the list.

index : number

Gets the index of the element in the list.

eventName : string

Gets the event name of the action.

transactionVersion
type : string

Gets the type of change.

Methods

Name Description
_apply()
_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.

clone() : pentaho.action.Base

Creates a shallow clone of this action.

validate() : Array.<pentaho.lang.UserError>

Determines if the given action is valid.

Constructor Details

new Remove(elems, index)

Creates an instance.

Source: javascript/web/pentaho/type/action/Remove.js, line 25

Parameters:
Name Default Value Summary
elems : Array.<pentaho.type.Element>

The elements to be removed from the list.

index : number

The starting index of the elements in the list.

Members Details

id:
Static

Source: javascript/web/pentaho/type/action/Remove.js, line 120

elements: Array.<pentaho.type.Element>

Gets the elements that are removed from the list.

Source: javascript/web/pentaho/type/action/Remove.js, line 50

index: number

Gets the index of the element in the list.

Source: javascript/web/pentaho/type/action/Remove.js, line 58

eventName: string

Gets the event name of the action.

The default implementation returns the value of pentaho.action.Base.id.

Source: javascript/web/pentaho/action/Base.js, line 82

Inherited From: pentaho.action.Base#eventName

transactionVersion:

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

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

type: string

Gets the type of change.

Source: javascript/web/pentaho/type/action/Remove.js, line 70

Default Value: "remove"

See also: pentaho.type.action.Change#type

Methods Details

_apply()

Source: javascript/web/pentaho/type/action/Remove.js, line 109

_cancel(changeset)
Protected

Unregisters reference changes caused by this change.

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

Overrides: 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

Overrides: 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.

clone() : pentaho.action.Base

Creates a shallow clone of this action.

Source: javascript/web/pentaho/action/Base.js, line 103

Inherited From: pentaho.action.Base#clone

Returns:
Name Description
pentaho.action.Base

The action clone.

validate() : Array.<pentaho.lang.UserError>

Determines if the given action is valid.

The default implementation does nothing and considers the instance valid. Override to implement an action's specific validation logic.

Source: javascript/web/pentaho/action/Base.js, line 94

Inherited From: pentaho.action.Base#validate

Returns:
Name Description
Array.<pentaho.lang.UserError> | null

A non-empty array of errors or null.