Changeset
pentaho.type.action Changeset
The Changeset
class describes a set of changes occurring in a structured value, the target
value.
A changeset is a container for a set of PrimitiveChange
instances.
AMD Module
require(["pentaho/type/action/Changeset"], function(Changeset) { /* code goes here */ });
Extends
Constructor
Name | Description |
---|---|
new Changeset(transaction, target) Abstract | Creates an empty |
Members
Name | Description |
---|---|
eventName | |
hasChanges : Abstract | Gets a value that indicates if this changeset contains any changes, whether they are primitive or in contained changesets. |
isReadOnly : | Gets a value that indicates if the changeset is in a read-only state and can no longer be modified. |
target : | Gets the container where the changes take place. |
targetVersion : | Gets the version of the target at the time when the changeset was created. |
transaction : | Gets the owning transaction. |
transactionVersion : | Gets the transaction version of this changeset. |
transactionVersionLocal : | Gets the local transaction version of this changeset. |
Methods
Name | Description |
---|---|
__onChildTxnVersionDirty() | Called by a child changeset when its version changes or becomes dirty. |
_assertWritable() Protected | Throws an error if the changeset is read-only. |
_clearChanges() Abstract 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 |
clearChanges() | Removes all changes from this changeset. |
compose(changeset) : pentaho.type.action.Changeset Abstract | Creates a new changeset which combines the current changeset with another one which contains new changes to the same |
eachChildChangeset(fun, ctx) Abstract | Calls a function once per child changeset. |
Constructor Details
new Changeset(transaction, target) Abstract | |||||||||
---|---|---|---|---|---|---|---|---|---|
Creates an empty Source: javascript/web/pentaho/type/action/Changeset.js, line 48
|
Members Details
eventName: |
---|
Source: javascript/web/pentaho/type/action/Change.js, line 40 Inherited From: pentaho.type.action.Change#eventName |
hasChanges: Abstract |
---|
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 |
isReadOnly: |
---|
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 |
target: |
---|
Gets the container where the changes take place. Source: javascript/web/pentaho/type/action/Changeset.js, line 62 |
targetVersion: |
---|
Gets the version of the target at the time when the changeset was created. Source: javascript/web/pentaho/type/action/Changeset.js, line 240 |
transaction: |
---|
Gets the owning transaction. Source: javascript/web/pentaho/type/action/Changeset.js, line 52 |
transactionVersion: |
---|
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 |
transactionVersionLocal: |
---|
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 |
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 |
_assertWritable() Protected | ||||
---|---|---|---|---|
Throws an error if the changeset is read-only. Source: javascript/web/pentaho/type/action/Changeset.js, line 206
|
_clearChanges() Abstract Protected |
---|
Actually removes all changes from this changeset. Source: javascript/web/pentaho/type/action/Changeset.js, line 465 |
_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 Source: javascript/web/pentaho/type/action/Changeset.js, line 453
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 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
|
_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 Source: javascript/web/pentaho/type/action/Changeset.js, line 335
|
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 Source: javascript/web/pentaho/type/action/Changeset.js, line 434
See also: pentaho.type.action.Changeset#_clearChanges , pentaho.type.action.Changeset#_clearChangesRecursive |
compose(changeset) : pentaho.type.action.Changeset Abstract | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new changeset which combines the current changeset with another one which contains new changes to the same Source: javascript/web/pentaho/type/action/Changeset.js, line 397
|
eachChildChangeset(fun, ctx) Abstract | |||||||||
---|---|---|---|---|---|---|---|---|---|
Calls a function once per child changeset. Source: javascript/web/pentaho/type/action/Changeset.js, line 186
|