Package net.ontopia.topicmaps.impl.utils
Class AbstractTopicMapTransaction
java.lang.Object
net.ontopia.topicmaps.impl.utils.AbstractTopicMapTransaction
- All Implemented Interfaces:
TopicMapTransactionIF
- Direct Known Subclasses:
InMemoryTopicMapTransaction,RDBMSTopicMapTransaction
INTERNAL: An abstract TopicMapTransactionIF implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected TopicMapBuilderIFprotected CollectionFactoryIFprotected IndexManagerIFprotected booleanprotected AbstractTopicMapTransactionprotected AbstractTopicMapStoreprotected TopicMapIFFields inherited from interface net.ontopia.topicmaps.impl.utils.TopicMapTransactionIF
EVENT_ABORT, EVENT_COMMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()PUBLIC: Aborts the transaction; all changes made inside the transaction are rolled back.voidabort(boolean invalidate) voidcommit()PUBLIC: Commits the transaction.PUBLIC: Gets a topic map builder for use with this transaction.PUBLIC: Gets the index manager that manages the topic map indexes in the transaction.getStore()PUBLIC: Gets the store to which the transaction is connected.PUBLIC: Gets the topic map that is accessible through the transaction.booleanisActive()PUBLIC: Returns true if the transaction is active (in process).abstract booleanvalidate()
-
Field Details
-
active
protected boolean active -
invalid
protected boolean invalid -
store
-
parent
-
topicmap
-
builder
-
cfactory
-
imanager
-
-
Constructor Details
-
AbstractTopicMapTransaction
public AbstractTopicMapTransaction()
-
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:TopicMapTransactionIFPUBLIC: 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:
isActivein interfaceTopicMapTransactionIF- Returns:
- Boolean: true if active, false if not active (either not yet aborted, or commited).
-
getBuilder
Description copied from interface:TopicMapTransactionIFPUBLIC: Gets a topic map builder for use with this transaction.- Specified by:
getBuilderin interfaceTopicMapTransactionIF- Returns:
- An object implementing TopicMapBuilderIF
-
getCollectionFactory
-
getIndexManager
Description copied from interface:TopicMapTransactionIFPUBLIC: Gets the index manager that manages the topic map indexes in the transaction.- Specified by:
getIndexManagerin interfaceTopicMapTransactionIF- Returns:
- The index manager used by the transaction: an object implementing IndexManagerIF.
-
getTopicMap
Description copied from interface:TopicMapTransactionIFPUBLIC: Gets the topic map that is accessible through the transaction.- Specified by:
getTopicMapin interfaceTopicMapTransactionIF- Returns:
- The topic map in the transaction; an object implementing TopicMapIF.
-
getStore
Description copied from interface:TopicMapTransactionIFPUBLIC: Gets the store to which the transaction is connected.- Specified by:
getStorein interfaceTopicMapTransactionIF
-
getParent
-
commit
public void commit()Description copied from interface:TopicMapTransactionIFPUBLIC: 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:
commitin interfaceTopicMapTransactionIF
-
abort
public void abort()Description copied from interface:TopicMapTransactionIFPUBLIC: 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:
abortin interfaceTopicMapTransactionIF
-
abort
public void abort(boolean invalidate) -
validate
public abstract boolean validate() -
createNested
-