de.topicmapslab.majortom.transaction
Class TransactionImpl

java.lang.Object
  extended by de.topicmapslab.majortom.core.ConstructImpl
      extended by de.topicmapslab.majortom.core.ReifiableImpl
          extended by de.topicmapslab.majortom.core.TopicMapImpl
              extended by de.topicmapslab.majortom.transaction.TransactionImpl
All Implemented Interfaces:
de.topicmapslab.majortom.model.core.IConstruct, de.topicmapslab.majortom.model.core.IReifiable, de.topicmapslab.majortom.model.core.ITopicMap, de.topicmapslab.majortom.model.core.paged.IPagedTopicMap, de.topicmapslab.majortom.model.transaction.ITransaction, java.io.Serializable, java.lang.Comparable<de.topicmapslab.majortom.model.core.IConstruct>, org.tmapi.core.Construct, org.tmapi.core.Reifiable, org.tmapi.core.TopicMap
Direct Known Subclasses:
InMemoryTransaction, InMemoryTransaction

public abstract class TransactionImpl
extends TopicMapImpl
implements de.topicmapslab.majortom.model.transaction.ITransaction

Author:
Sven Krosse
See Also:
Serialized Form

Field Summary
private  boolean close
          flag indicates if a transaction is close
private static long serialVersionUID
           
private  de.topicmapslab.majortom.model.core.ITopicMap topicMap
          the topic map
 
Constructor Summary
TransactionImpl(de.topicmapslab.majortom.model.core.ITopicMap parent)
          constructor
 
Method Summary
 void addItemIdentifier(org.tmapi.core.Locator identifier)
          
 void commit()
          
 org.tmapi.core.Association createAssociation(org.tmapi.core.Topic type, java.util.Collection<org.tmapi.core.Topic> themes)
          
 org.tmapi.core.Association createAssociation(org.tmapi.core.Topic type, org.tmapi.core.Topic... themes)
          
 java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()
          
 org.tmapi.core.Topic getReifier()
          
abstract  de.topicmapslab.majortom.model.transaction.ITransactionTopicMapStore getStore()
          
 de.topicmapslab.majortom.model.core.ITopicMap getTopicMap()
          
 boolean isClose()
          
 void removeItemIdentifier(org.tmapi.core.Locator identifier)
          
 void rollback()
          
 void setReifier(org.tmapi.core.Topic reifier)
          
 
Methods inherited from class de.topicmapslab.majortom.core.TopicMapImpl
addTag, addTag, addTopicMapListener, clear, close, createLocator, createScope, createScope, createTopic, createTopicByItemIdentifier, createTopicBySubjectIdentifier, createTopicBySubjectLocator, createTransaction, getAssociations, getAssociations, getAssociations, getAssociations, getAssociations, getAssociations, getConstructById, getConstructByItemIdentifier, getIdentity, getIndex, getLocator, getNumberOfAssociations, getNumberOfTopics, getTopicBySubjectIdentifier, getTopicBySubjectLocator, getTopicMapSystem, getTopics, getTopics, getTopics, getTopics, mergeIn, remove, removeDuplicates, removeTopicMapListener, setStore, toString
 
Methods inherited from class de.topicmapslab.majortom.core.ConstructImpl
compareTo, equals, getId, getParent, hashCode, isRemoved, longId, remove, setRemoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.topicmapslab.majortom.model.transaction.ITransaction
moveToTransactionContext
 
Methods inherited from interface de.topicmapslab.majortom.model.core.ITopicMap
addTag, addTag, addTopicMapListener, clear, createScope, createScope, createTransaction, getAssociations, getAssociations, getAssociations, getTopicMapSystem, getTopics, removeDuplicates, removeTopicMapListener
 
Methods inherited from interface org.tmapi.core.TopicMap
close, createLocator, createTopic, createTopicByItemIdentifier, createTopicBySubjectIdentifier, createTopicBySubjectLocator, getAssociations, getConstructById, getConstructByItemIdentifier, getIndex, getLocator, getParent, getTopicBySubjectIdentifier, getTopicBySubjectLocator, getTopics, mergeIn
 
Methods inherited from interface de.topicmapslab.majortom.model.core.IConstruct
isRemoved, longId, remove
 
Methods inherited from interface org.tmapi.core.Construct
equals, getId, hashCode, remove
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

topicMap

private final de.topicmapslab.majortom.model.core.ITopicMap topicMap
the topic map


close

private boolean close
flag indicates if a transaction is close

Constructor Detail

TransactionImpl

public TransactionImpl(de.topicmapslab.majortom.model.core.ITopicMap parent)
constructor

Parameters:
parent - the parent topic map
Method Detail

commit

public void commit()
            throws de.topicmapslab.majortom.model.exception.TransactionException

Specified by:
commit in interface de.topicmapslab.majortom.model.transaction.ITransaction
Throws:
de.topicmapslab.majortom.model.exception.TransactionException

rollback

public void rollback()

Specified by:
rollback in interface de.topicmapslab.majortom.model.transaction.ITransaction

getStore

public abstract de.topicmapslab.majortom.model.transaction.ITransactionTopicMapStore getStore()

Specified by:
getStore in interface de.topicmapslab.majortom.model.core.ITopicMap
Overrides:
getStore in class TopicMapImpl

getTopicMap

public de.topicmapslab.majortom.model.core.ITopicMap getTopicMap()

Specified by:
getTopicMap in interface de.topicmapslab.majortom.model.core.IConstruct
Specified by:
getTopicMap in interface org.tmapi.core.Construct
Overrides:
getTopicMap in class TopicMapImpl

isClose

public boolean isClose()

Specified by:
isClose in interface de.topicmapslab.majortom.model.transaction.ITransaction

setReifier

public void setReifier(org.tmapi.core.Topic reifier)
                throws org.tmapi.core.ModelConstraintException

Specified by:
setReifier in interface org.tmapi.core.Reifiable
Overrides:
setReifier in class ReifiableImpl
Throws:
org.tmapi.core.ModelConstraintException

getReifier

public org.tmapi.core.Topic getReifier()

Specified by:
getReifier in interface org.tmapi.core.Reifiable
Overrides:
getReifier in class ReifiableImpl

addItemIdentifier

public void addItemIdentifier(org.tmapi.core.Locator identifier)
                       throws org.tmapi.core.ModelConstraintException

Specified by:
addItemIdentifier in interface org.tmapi.core.Construct
Overrides:
addItemIdentifier in class ConstructImpl
Throws:
org.tmapi.core.ModelConstraintException

removeItemIdentifier

public void removeItemIdentifier(org.tmapi.core.Locator identifier)

Specified by:
removeItemIdentifier in interface org.tmapi.core.Construct
Overrides:
removeItemIdentifier in class ConstructImpl

getItemIdentifiers

public java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()

Specified by:
getItemIdentifiers in interface org.tmapi.core.Construct
Overrides:
getItemIdentifiers in class ConstructImpl

createAssociation

public org.tmapi.core.Association createAssociation(org.tmapi.core.Topic type,
                                                    org.tmapi.core.Topic... themes)
                                             throws org.tmapi.core.ModelConstraintException

Specified by:
createAssociation in interface org.tmapi.core.TopicMap
Overrides:
createAssociation in class TopicMapImpl
Throws:
org.tmapi.core.ModelConstraintException

createAssociation

public org.tmapi.core.Association createAssociation(org.tmapi.core.Topic type,
                                                    java.util.Collection<org.tmapi.core.Topic> themes)
                                             throws org.tmapi.core.ModelConstraintException

Specified by:
createAssociation in interface org.tmapi.core.TopicMap
Overrides:
createAssociation in class TopicMapImpl
Throws:
org.tmapi.core.ModelConstraintException