org.ontobox.box.box2model
Class BoxSession

java.lang.Object
  extended by org.ontobox.box.box2model.BoxSession
All Implemented Interfaces:
Session
Direct Known Subclasses:
FastSession

public class BoxSession
extends java.lang.Object
implements Session

Author:
Anton Malykh

Field Summary
protected  Box box
           
 
Constructor Summary
BoxSession(Box box)
           
 
Method Summary
 void close()
          Close the ontobox session.
 Box getBox()
           
 BoxListenerManager getListenerManager()
           
 Connection openConnection()
          Open an autocommit connection for the ontobox session.
 Connection openTransaction()
          Open a transaction connection for the ontobox session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

box

protected final Box box
Constructor Detail

BoxSession

public BoxSession(Box box)
Method Detail

openConnection

public Connection openConnection()
Description copied from interface: Session
Open an autocommit connection for the ontobox session. An autocommit connection writes down all changes on ontobase without rollback ability. A connection must be closed after using.

Specified by:
openConnection in interface Session
Returns:
new autocommin connection
See Also:
Connection.close()

openTransaction

public Connection openTransaction()
Description copied from interface: Session
Open a transaction connection for the ontobox session. During closing a transaction connection it can be commited or can be rolled back. A connection must be closed after using (the Connection.close method for commit or the Connection.closeRollback method for rollback).

Specified by:
openTransaction in interface Session
Returns:
new transaction connection
See Also:
Connection.close(), Connection.closeRollback()

getListenerManager

public BoxListenerManager getListenerManager()
Specified by:
getListenerManager in interface Session

close

public void close()
Description copied from interface: Session
Close the ontobox session.

Specified by:
close in interface Session

getBox

public Box getBox()
Specified by:
getBox in interface Session