Package helma.objectmodel

# Interface ITransaction

public interface ITransaction
This interface is kept for databases that are able to run transactions.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ADDED`
`static final int`
`DELETED`
`static final int`
`UPDATED`

## Method Summary

Modifier and Type
Method
Description
`void`
`abort()`
Rollback the transaction, forgetting the changed items
`void`
`addResource(Object res, int status)`
Adds a resource to the list of resources encompassed by this transaction
`void`
`commit()`
Complete the transaction by making its changes persistent.

## Field Details

### ADDED

static final int ADDED

See Also:
  - Constant Field Values

### UPDATED

static final int UPDATED

See Also:
  - Constant Field Values

### DELETED

static final int DELETED

See Also:
  - Constant Field Values

## Method Details

### commit

void commit() throws DatabaseException
Complete the transaction by making its changes persistent.

Throws:
  `DatabaseException`

### abort

void abort() throws DatabaseException
Rollback the transaction, forgetting the changed items

Throws:
  `DatabaseException`

### addResource

void addResource(Object res, int status) throws DatabaseException
Adds a resource to the list of resources encompassed by this transaction

Parameters:
  `res` - the resource to add
  `status` - the status of the resource (ADDED|UPDATED|DELETED)
Throws:
  `DatabaseException`