Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

ComplexChangeset

pentaho.type.action. ComplexChangeset

The class ComplexChangeset describes a set of changes to the values of properties in a complex value.

AMD Module

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

Extends

Constructor

Name Description
new ComplexChangeset(transaction, target)

Creates a new instance.

Members

Name Description
id
Static
_changes :  Object.<string, pentaho.type.action.Change>
Protected

A map of property name to a corresponding change.

eventName
hasChanges :  boolean

Gets a value that indicates if this changeset contains any changes, whether they are primitive or in contained changesets.

isReadOnly :  boolean

Gets a value that indicates if the changeset is in a read-only state and can no longer be modified.

propertyNames :  Array.<string>

Gets an array with the names of all of the changed properties contained in this changeset.

target :  pentaho.type.Complex

Gets the complex value where the changes take place.

targetVersion :  number

Gets the version of the target at the time when the changeset was created.

transaction :  pentaho.type.action.Transaction

Gets the owning transaction.

transactionVersion :  number

Gets the transaction version of this changeset.

transactionVersionLocal :  number

Gets the local transaction version of this changeset.

type :  string

Gets the type of change.

Methods

Name Description
__onChildTxnVersionDirty()

Called by a child changeset when its version changes or becomes dirty.

_apply()
_assertWritable()
Protected

Throws an error if the changeset is read-only.

_clearChanges()
Protected

Actually removes all changes from this changeset.

_clearChangesRecursive(parentChangeset)
Protected

Called by a parent changeset on its child changeset, this, for it to clear its changes.

_resetNetOrder()
Protected

Resets the topological order of this changeset, and of any child changesets, by calculating it based on its current parents.

_setTransactionVersion(txnVersion, noNotifyParentChangeset)
Protected

Updates the transaction version to a given value, if it is greater than the current one. Notifies all parents, except the optionally specified one, that their version is dirty.

_setTransactionVersionLocal(txnVersionLocal, noNotifyParentChangeset)
Protected

Updates the local transaction version to a given value due to a local, primitive change, if it is greater than the current one. Then, it calls _setTransactionVersion with the same arguments.

clearChanges()

Removes all changes from this changeset.

compose(changeset) : pentaho.type.action.Changeset

Creates a new changeset which combines the current changeset with another one which contains new changes to the same target.

eachChildChangeset(fun, ctx)

Calls a function once per child changeset.

getChange(propertyOrName) : pentaho.type.action.Change

Gets the change object associated with the specified property.

getOld(name) : pentaho.type.Value

Gets the original value of a property.

hasChange(propertyOrName) : boolean

Determines if the given property has changed.

Constructor Details

new ComplexChangeset(transaction, target)

Creates a new instance.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 31

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

The owning transaction.

target : pentaho.type.Complex

The complex value where the changes take place.

Members Details

id:
Static

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 476

_changes:  Object.<string, pentaho.type.action.Change>
Protected

A map of property name to a corresponding change.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 62

eventName:

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

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

hasChanges:  boolean

Gets a value that indicates if this changeset contains any changes, whether they are primitive or in contained changesets.

Source: javascript/web/pentaho/type/action/Changeset.js, line 387

Overrides: pentaho.type.action.Changeset#hasChanges

isReadOnly:  boolean

Gets a value that indicates if the changeset is in a read-only state and can no longer be modified.

Source: javascript/web/pentaho/type/action/Changeset.js, line 217

Inherited From: pentaho.type.action.Changeset#isReadOnly

propertyNames:  Array.<string>

Gets an array with the names of all of the changed properties contained in this changeset.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 157

target:  pentaho.type.Complex

Gets the complex value where the changes take place.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 65

Overrides: pentaho.type.action.Changeset#target

targetVersion:  number

Gets the version of the target at the time when the changeset was created.

Source: javascript/web/pentaho/type/action/Changeset.js, line 240

Inherited From: pentaho.type.action.Changeset#targetVersion

transaction:  pentaho.type.action.Transaction

Gets the owning transaction.

Source: javascript/web/pentaho/type/action/Changeset.js, line 52

Inherited From: pentaho.type.action.Changeset#transaction

transactionVersion:  number

Gets the transaction version of this changeset.

This number is at least as high as the transaction version of any child changesets and primitive changes.

Source: javascript/web/pentaho/type/action/Changeset.js, line 264

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

transactionVersionLocal:  number

Gets the local transaction version of this changeset.

This number is the maximum transaction version of the contained primitive changes.

Source: javascript/web/pentaho/type/action/Changeset.js, line 252

Inherited From: pentaho.type.action.Changeset#transactionVersionLocal

type:  string

Gets the type of change.

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

Default Value: "complex"

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

Methods Details

__onChildTxnVersionDirty()

Called by a child changeset when its version changes or becomes dirty.

Source: javascript/web/pentaho/type/action/Changeset.js, line 379

Inherited From: pentaho.type.action.Changeset#__onChildTxnVersionDirty

_apply()

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 455

_assertWritable()
Protected

Throws an error if the changeset is read-only.

Source: javascript/web/pentaho/type/action/Changeset.js, line 206

Inherited From: pentaho.type.action.Changeset#_assertWritable

Throws:
Name Description
pentaho.lang.OperationInvalidError

When the changeset has been marked read-only.

_clearChanges()
Protected

Actually removes all changes from this changeset.

Source: javascript/web/pentaho/type/action/Changeset.js, line 465

Overrides: pentaho.type.action.Changeset#_clearChanges

See also: pentaho.type.action.Changeset#clearChanges

_clearChangesRecursive(parentChangeset)
Protected

Called by a parent changeset on its child changeset, this, for it to clear its changes.

This method updates the transaction version of this changeset to match the parent's version and then delegates to the _clearChanges method.

Source: javascript/web/pentaho/type/action/Changeset.js, line 453

Inherited From: pentaho.type.action.Changeset#_clearChangesRecursive

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

The parent changeset.

See also: pentaho.type.action.Changeset#transactionVersion , pentaho.type.action.Changeset#clearChanges

_resetNetOrder()
Protected

Resets the topological order of this changeset, and of any child changesets, by calculating it based on its current parents.

Source: javascript/web/pentaho/type/action/Changeset.js, line 111

Inherited From: pentaho.type.action.Changeset#_resetNetOrder

See also: pentaho.type.action.Changeset#__calculateNetOrder

_setTransactionVersion(txnVersion, noNotifyParentChangeset)
Protected

Updates the transaction version to a given value, if it is greater than the current one. Notifies all parents, except the optionally specified one, that their version is dirty.

Source: javascript/web/pentaho/type/action/Changeset.js, line 308

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

Parameters:
Name Default Value Summary
txnVersion : number

The new transaction version.

noNotifyParentChangeset : pentaho.type.action.Changeset
Optional
null

The parent changeset that should not be notified.

_setTransactionVersionLocal(txnVersionLocal, noNotifyParentChangeset)
Protected

Updates the local transaction version to a given value due to a local, primitive change, if it is greater than the current one. Then, it calls _setTransactionVersion with the same arguments.

Source: javascript/web/pentaho/type/action/Changeset.js, line 335

Inherited From: pentaho.type.action.Changeset#_setTransactionVersionLocal

Parameters:
Name Default Value Summary
txnVersionLocal : number

The new local transaction version.

noNotifyParentChangeset : pentaho.type.action.Changeset
Optional
null

The parent changeset that should not be notified.

clearChanges()

Removes all changes from this changeset.

Primitive changes are removed, while contained changesets are cleared.

This method validates that the changeset is in a valid state and then delegates actual work to the _clearChangesRecursive method.

Source: javascript/web/pentaho/type/action/Changeset.js, line 434

Inherited From: pentaho.type.action.Changeset#clearChanges

Throws:
Name Description
pentaho.lang.OperationInvalidError

When the changeset or any of its contained changesets have been marked read-only.

See also: pentaho.type.action.Changeset#_clearChanges , pentaho.type.action.Changeset#_clearChangesRecursive

compose(changeset) : pentaho.type.action.Changeset

Creates a new changeset which combines the current changeset with another one which contains new changes to the same target.

Source: javascript/web/pentaho/type/action/Changeset.js, line 397

Overrides: pentaho.type.action.Changeset#compose

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

The new changeset.

Returns:
Name Description
pentaho.type.action.Changeset

The composed changeset.

Throws:
Name Description
pentaho.lang.ArgumentInvalidTypeError

When changeset is not a pentaho.type.action.Changeset.

pentaho.lang.ArgumentInvalidError

When changeset is the same as this.

pentaho.lang.ArgumentInvalidError

When composing with a changeset that has a different target.

pentaho.lang.ArgumentInvalidError

When composing with a changeset that has a previous targetVersion.

eachChildChangeset(fun, ctx)

Calls a function once per child changeset.

Source: javascript/web/pentaho/type/action/Changeset.js, line 186

Overrides: pentaho.type.action.Changeset#eachChildChangeset

Parameters:
Name Default Value Summary
fun : function

The function to call.

ctx : *

The this context on which to call fun.

getChange(propertyOrName) : pentaho.type.action.Change

Gets the change object associated with the specified property.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 107

Parameters:
Name Default Value Summary
propertyOrName : nonEmptyString | pentaho.type.PropertyType

The property name or type object.

Returns:
Name Description
pentaho.type.action.Change

An object describing the changes to be performed in the given property, or null if the property has not changed.

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When a property with name propertyOrName is not defined.

getOld(name) : pentaho.type.Value

Gets the original value of a property.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 204

Parameters:
Name Default Value Summary
name : nonEmptyString | pentaho.type.PropertyType

The property name or type object.

Returns:
Name Description
pentaho.type.Value

The original value of the property (before the change).

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When a property with name name is not defined.

hasChange(propertyOrName) : boolean

Determines if the given property has changed.

Source: javascript/web/pentaho/type/action/ComplexChangeset.js, line 134

Parameters:
Name Default Value Summary
propertyOrName : nonEmptyString | pentaho.type.PropertyType

The property name or type object.

Returns:
Name Description
boolean

true if the property has changed; false, otherwise.

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When a property with name propertyOrName is not defined.