Package helma.objectmodel

# Interface IDatabase

All Known Implementing Classes:
  `XmlDatabase`

public interface IDatabase
Interface that is implemented by Database wrappers

## Method Summary

Modifier and Type
Method
Description
`void`
`abortTransaction(ITransaction transaction)`
Abort a transaction, rolling back all changes.
`ITransaction`
`beginTransaction()`
Begin a new transaction.
`void`
`commitTransaction(ITransaction transaction)`
Commit a transaction, making all changes persistent
`void`
`deleteNode(ITransaction transaction, String key)`
Delete the node specified by the given key.
`INode`
`getNode(ITransaction transaction, String key)`
Get the node from the database specified by the given key.
`void`
`init(File dbHome, Application app)`
Initialize the database with the given db directory and application.
`void`
`insertNode(ITransaction transaction, String key, INode node)`
Insert a node with the given key
`String`
`nextID()`
Get the next ID from the db's ID generator
`void`
`shutdown()`
Let the database know we're shutting down.
`void`
`updateNode(ITransaction transaction, String key, INode node)`
Update a node with the given key

## Method Details

### init

void init(File dbHome, Application app)
Initialize the database with the given db directory and application.

Parameters:
  `dbHome` -
  `app` -

### shutdown

void shutdown()
Let the database know we're shutting down.

### nextID

String nextID() throws ObjectNotFoundException
Get the next ID from the db's ID generator

Returns:
  a unique id
Throws:
  `ObjectNotFoundException`

### getNode

INode getNode(ITransaction transaction, String key) throws IOException, ObjectNotFoundException
Get the node from the database specified by the given key.

Parameters:
  `transaction` -
  `key` -
Returns:
Throws:
  `IOException`
  `ObjectNotFoundException` - if no object exists for the key.

### insertNode

void insertNode(ITransaction transaction, String key, INode node) throws IOException
Insert a node with the given key

Parameters:
  `transaction` -
  `key` -
  `node` -
Throws:
  `IOException`

### updateNode

void updateNode(ITransaction transaction, String key, INode node) throws IOException
Update a node with the given key

Parameters:
  `transaction` -
  `key` -
  `node` -
Throws:
  `IOException`

### deleteNode

void deleteNode(ITransaction transaction, String key) throws IOException
Delete the node specified by the given key.

Parameters:
  `transaction` - ...
  `key` - ...
Throws:
  `IOException` - ...

### beginTransaction

ITransaction beginTransaction()
Begin a new transaction.

Returns:
  the transaction

### commitTransaction

void commitTransaction(ITransaction transaction) throws DatabaseException
Commit a transaction, making all changes persistent

Parameters:
  `transaction` -
Throws:
  `DatabaseException`

### abortTransaction

void abortTransaction(ITransaction transaction) throws DatabaseException
Abort a transaction, rolling back all changes.

Parameters:
  `transaction` -
Throws:
  `DatabaseException`