org.dartra.framework.dao
Interface Connection


public interface Connection

Persistence technology agnostic connection interface. Connections are created by a DataSource.

Note that this interface uses the DataSource-Connection metaphor used by JDBC, but it is in no way linked to JDBC.

One way to look at a connection is as a Unit of Work [Fowler]: it provides commit and rollback methods to commit the changes to the persistent store or to undo them.

Author:
Erwin Vervaet

Method Summary
 void close()
          Close this connection to the data source.
 void commit()
          Commit all changes made since the last commit.
 void rollback()
          Rollback all changes since the last commit.
 

Method Detail

commit

public void commit()
            throws DataAccessException

Commit all changes made since the last commit.

Throws:
DataAccessException

rollback

public void rollback()
              throws DataAccessException

Rollback all changes since the last commit.

Throws:
DataAccessException

close

public void close()
           throws DataAccessException

Close this connection to the data source.

Throws:
DataAccessException