Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Replace

pentaho.type.changes. Replace

The Replace class describes the primitive operation that replaces the value of an element property of a complex instance.

This type of change is always part of a pentaho.type.changes.ComplexChangeset.

AMD Module

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

Extends

Constructor

Name Description
new Replace(propType, valueNew, stateNew)

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.

property : pentaho.type.PropertyType

Gets the property whose value is replaced.

state : number

Gets the state that will replace the current state of the property.

transactionVersion : number

Gets the transaction version of this change.

type : string

Gets the type of change.

value : pentaho.type.Element

Gets the value that will replace the current value of the property.

Methods

Name Description
_apply(target)
Protected

Applies any local primitive changes.

_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.

extend(source, keyArgs) : Object

Extend an object with the properties of another.

Constructor Details

new Replace(propType, valueNew, stateNew)

Creates an instance.

Source: javascript/web/pentaho/type/changes/Replace.js, line 49

Parameters:
Name Default Value Summary
propType : pentaho.type.PropertyType

The property type.

valueNew : pentaho.type.Element

The proposed value of the property.

stateNew : number

The proposed state of the property.

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

property: pentaho.type.PropertyType

Gets the property whose value is replaced.

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

state: number

Gets the state that will replace the current state of the property.

Source: javascript/web/pentaho/type/changes/Replace.js, line 140

transactionVersion: number

Gets the transaction version of this change.

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

Inherited From: pentaho.type.changes.Change#transactionVersion

type: string

Gets the type of change.

Source: javascript/web/pentaho/type/changes/Replace.js, line 120

Default Value: "replace"

Overrides: pentaho.type.changes.PrimitiveChange#type

value: pentaho.type.Element

Gets the value that will replace the current value of the property.

Source: javascript/web/pentaho/type/changes/Replace.js, line 130

Methods Details

_apply(target)
Protected

Applies any local primitive changes.

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

Overrides: pentaho.type.changes.PrimitiveChange#_apply

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

The container to which changes are applied.

_cancel(changeset)
Protected

Unregisters reference changes caused by this change.

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

Overrides: pentaho.type.changes.PrimitiveChange#_cancel

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

The changeset.

_prepare(changeset)
Protected

Registers reference changes caused by this change.

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

Overrides: pentaho.type.changes.PrimitiveChange#_prepare

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

The changeset.

_setTransactionVersion(txnVersion)
Protected

Sets the new transaction version of this change.

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

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

Parameters:
Name Default Value Summary
txnVersion : number

The transaction version.

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.