net.ontopia.topicmaps.impl.utils
Class AbstractTopicMapTransaction

java.lang.Object
  extended by net.ontopia.topicmaps.impl.utils.AbstractTopicMapTransaction
All Implemented Interfaces:
TopicMapTransactionIF
Direct Known Subclasses:
InMemoryTopicMapTransaction, RDBMSTopicMapTransaction

public abstract class AbstractTopicMapTransaction
extends java.lang.Object
implements TopicMapTransactionIF

INTERNAL: An abstract TopicMapTransactionIF implementation.


Field Summary
protected  boolean active
           
protected  TopicMapBuilderIF builder
           
protected  CollectionFactoryIF cfactory
           
protected  IndexManagerIF imanager
           
protected  boolean invalid
           
protected  AbstractTopicMapTransaction parent
           
protected  AbstractTopicMapStore store
           
protected  TopicMapIF topicmap
           
 
Constructor Summary
AbstractTopicMapTransaction()
           
 
Method Summary
 void abort()
          PUBLIC: Aborts the transaction; all changes made inside the transaction are rolled back.
 void abort(boolean invalidate)
           
 void commit()
          PUBLIC: Commits the transaction.
 TopicMapTransactionIF createNested()
           
 TopicMapBuilderIF getBuilder()
          PUBLIC: Gets a topic map builder for use with this transaction.
 CollectionFactoryIF getCollectionFactory()
           
 IndexManagerIF getIndexManager()
          PUBLIC: Gets the index manager that manages the topic map indexes in the transaction.
 TopicMapTransactionIF getParent()
           
 TopicMapStoreIF getStore()
          PUBLIC: Gets the store to which the transaction is connected.
 TopicMapIF getTopicMap()
          PUBLIC: Gets the topic map that is accessible through the transaction.
 boolean isActive()
          PUBLIC: Returns true if the transaction is active (in process).
abstract  boolean validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

active

protected boolean active

invalid

protected boolean invalid

store

protected AbstractTopicMapStore store

parent

protected AbstractTopicMapTransaction parent

topicmap

protected TopicMapIF topicmap

builder

protected TopicMapBuilderIF builder

cfactory

protected CollectionFactoryIF cfactory

imanager

protected IndexManagerIF imanager
Constructor Detail

AbstractTopicMapTransaction

public AbstractTopicMapTransaction()
Method Detail

isActive

public boolean isActive()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Returns true if the transaction is active (in process). A transaction is started immediately after it has been created, so there is no explicit method to call in order to activate a transaction.

Specified by:
isActive in interface TopicMapTransactionIF
Returns:
Boolean: true if active, false if not active (either not yet aborted, or commited).

getBuilder

public TopicMapBuilderIF getBuilder()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Gets a topic map builder for use with this transaction.

Specified by:
getBuilder in interface TopicMapTransactionIF
Returns:
An object implementing TopicMapBuilderIF

getCollectionFactory

public CollectionFactoryIF getCollectionFactory()

getIndexManager

public IndexManagerIF getIndexManager()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Gets the index manager that manages the topic map indexes in the transaction.

Specified by:
getIndexManager in interface TopicMapTransactionIF
Returns:
The index manager used by the transaction: an object implementing IndexManagerIF.

getTopicMap

public TopicMapIF getTopicMap()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Gets the topic map that is accessible through the transaction.

Specified by:
getTopicMap in interface TopicMapTransactionIF
Returns:
The topic map in the transaction; an object implementing TopicMapIF.

getStore

public TopicMapStoreIF getStore()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Gets the store to which the transaction is connected.

Specified by:
getStore in interface TopicMapTransactionIF

getParent

public TopicMapTransactionIF getParent()

commit

public void commit()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Commits the transaction. The changes made are written to the persistent store.

The transaction will resume after the commit meaning that the objects retrieved through is still usable after the commit.

Specified by:
commit in interface TopicMapTransactionIF

abort

public void abort()
Description copied from interface: TopicMapTransactionIF
PUBLIC: Aborts the transaction; all changes made inside the transaction are rolled back.

The transaction will resume after the abort meaning that the objects retrieved through is still usable after the abort, but their state has been reverted to the state in the persistent store.

Specified by:
abort in interface TopicMapTransactionIF

abort

public void abort(boolean invalidate)

validate

public abstract boolean validate()

createNested

public TopicMapTransactionIF createNested()


Copyright © 2000-2012 Ontopia.