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

AbstractTransactionScope

pentaho.type.action AbstractTransactionScope

The AbstractTransactionScope class is the abstract base class of classes that control the ambient/current transaction.

Constructor

Name Description
new AbstractTransactionScope(transaction)

Creates a CommittedScope.

Members

Name Description
isCurrent : boolean

Gets a value that indicates if this scope is the current scope.

isInside : boolean

Gets a value that indicates if this scope has not been exited.

transaction : pentaho.type.action.Transaction

Gets the associated transaction, if any, or null.

Methods

Name Description
_assertInsideAndCurrent()
Protected

Throws an error if the scope has been exited from or is not the current scope.

dispose()

Exits the scope, without any warnings in case it is not inside or is not the current scope.

exit(keyArgs) : pentaho.type.action.AbstractTransactionScope

Exits the scope.

using(fun, ctx) : *

Calls a given function within the scope and safely exits from the scope.

Constructor Details

new AbstractTransactionScope(transaction)

Creates a CommittedScope.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 48

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

The associated transaction.

Throws:
Name Description
pentaho.lang.OperationInvalidError

When the specified transaction is resolved.

pentaho.type.action.TransactionRejectedError

When this is the root scope of the specified transaction and the transaction is automatically rejected due to a concurrency error.

Members Details

isCurrent: boolean

Gets a value that indicates if this scope is the current scope.

The current scope is the innermost scope.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 136

isInside: boolean

Gets a value that indicates if this scope has not been exited.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 124

transaction: pentaho.type.action.Transaction

Gets the associated transaction, if any, or null.

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

Methods Details

_assertInsideAndCurrent()
Protected

Throws an error if the scope has been exited from or is not the current scope.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 91

Throws:
Name Description
pentaho.lang.OperationInvalidError

When the scope has been exited from or it is not the current scope.

dispose()

Exits the scope, without any warnings in case it is not inside or is not the current scope.

This method is equivalent to calling exit with keyArgs.sloppy with value true.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 229

exit(keyArgs) : pentaho.type.action.AbstractTransactionScope

Exits the scope.

After this operation, the scope cannot be operated on anymore. However, properties like transaction remain available for reading.

If this method is called and the the scope has already been exited from, or is not the current scope, a warning is logged, unless keyArgs.sloppy is true.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 181

Parameters:
Name Default Value Summary
keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
sloppy : boolean
Optional

Indicates that no warning should be logged if this method is called when the scope has already been exited from or is not the current scope.

Returns:
Name Description
pentaho.type.action.AbstractTransactionScope

This scope.

using(fun, ctx) : *

Calls a given function within the scope and safely exits from the scope.

Source: javascript/web/pentaho/type/action/AbstractTransactionScope.js, line 154

Parameters:
Name Default Value Summary
fun : function

The function to call within the scope. The function is called with the this context specified in argument ctx. The return value of fun is returned back from this method.

ctx : object
Optional

The this context in which to call fun. When unspecified, the function will have a null this.

Returns:
Name Description
*

The value returned by fun.

Throws:
Name Description
Error

Any error thrown from within fun.