Package net.ontopia.topicmaps.impl.rdbms
Class RDBMSTopicMapTransaction
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.AbstractTopicMapTransaction
-
- net.ontopia.topicmaps.impl.rdbms.RDBMSTopicMapTransaction
-
- All Implemented Interfaces:
EventListenerIF,EventManagerIF,TopicMapTransactionIF
public class RDBMSTopicMapTransaction extends AbstractTopicMapTransaction implements EventManagerIF
INTERNAL: The rdbms topic map transaction implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected longactual_idprotected Maplistenersprotected ObjectTreeManagerotreeprotected booleanreadonlyprotected RoleTypeAssocTypeCachertatcacheprotected RoleTypeCachertcacheprotected SubjectIdentityCachesicacheprotected TopicEventsteprotected TopicModificationManagertopicmodsprotected TransactionIFtxn-
Fields inherited from class net.ontopia.topicmaps.impl.utils.AbstractTopicMapTransaction
active, builder, cfactory, imanager, invalid, parent, store, topicmap
-
Fields inherited from interface net.ontopia.topicmaps.impl.utils.TopicMapTransactionIF
EVENT_ABORT, EVENT_COMMIT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()PUBLIC: Aborts the transaction; all changes made inside the transaction are rolled back.voidabort(boolean invalidate)voidaddListener(EventListenerIF listener, String event)INTERNAL: Register the listener as a listener for the event.voidcommit()PUBLIC: Commits the transaction.TopicMapTransactionIFcreateNested()longgetActualId()Collection<AssociationIF>getAssocations(TopicIF topic)Collection<AssociationIF>getAssociationsByType(TopicIF topic, TopicIF type)TMObjectIFgetObjectByItemIdentifier(LocatorIF locator)ObjectTreeManagergetObjectTreeManager()Collection<OccurrenceIF>getOccurrencesByType(TopicIF topic, TopicIF type)Collection<AssociationRoleIF>getRolesByType(TopicIF player, TopicIF rtype)Collection<AssociationRoleIF>getRolesByType(TopicIF player, TopicIF rtype, TopicIF atype)TopicIFgetTopicBySubjectIdentifier(LocatorIF locator)TopicIFgetTopicBySubjectLocator(LocatorIF locator)TopicMapIFgetTopicMap()PUBLIC: Gets the topic map that is accessible through the transaction.Collection<TopicNameIF>getTopicNamesByType(TopicIF topic, TopicIF type)TransactionIFgetTransaction()INTERNAL: Returns the proxy transaction used by the topic map transaction.voidprefetchRolesByType(Collection players, TopicIF rtype, TopicIF atype)voidprocessEvent(Object object, String event, Object new_value, Object old_value)INTERNAL: A method that receives notification when an event has been triggered.voidremoveListener(EventListenerIF listener, String event)INTERNAL: Unregister the listener as a listener for the event.StringtoString()booleanvalidate()-
Methods inherited from class net.ontopia.topicmaps.impl.utils.AbstractTopicMapTransaction
getBuilder, getCollectionFactory, getIndexManager, getParent, getStore, isActive
-
-
-
-
Field Detail
-
txn
protected TransactionIF txn
-
readonly
protected boolean readonly
-
actual_id
protected long actual_id
-
sicache
protected SubjectIdentityCache sicache
-
rtcache
protected RoleTypeCache rtcache
-
rtatcache
protected RoleTypeAssocTypeCache rtatcache
-
listeners
protected Map listeners
-
otree
protected ObjectTreeManager otree
-
topicmods
protected TopicModificationManager topicmods
-
te
protected TopicEvents te
-
-
Method Detail
-
getActualId
public long getActualId()
-
getObjectTreeManager
public ObjectTreeManager getObjectTreeManager()
-
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- Overrides:
commitin classAbstractTopicMapTransaction
-
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- Overrides:
abortin classAbstractTopicMapTransaction
-
abort
public void abort(boolean invalidate)
- Overrides:
abortin classAbstractTopicMapTransaction
-
validate
public boolean validate()
- Specified by:
validatein classAbstractTopicMapTransaction
-
createNested
public TopicMapTransactionIF createNested()
- Overrides:
createNestedin classAbstractTopicMapTransaction
-
getTransaction
public TransactionIF getTransaction()
INTERNAL: Returns the proxy transaction used by the topic map transaction.
-
getTopicMap
public TopicMapIF getTopicMap()
Description copied from interface:TopicMapTransactionIFPUBLIC: Gets the topic map that is accessible through the transaction.- Specified by:
getTopicMapin interfaceTopicMapTransactionIF- Overrides:
getTopicMapin classAbstractTopicMapTransaction- Returns:
- The topic map in the transaction; an object implementing TopicMapIF.
-
addListener
public void addListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIFINTERNAL: Register the listener as a listener for the event.- Specified by:
addListenerin interfaceEventManagerIF
-
removeListener
public void removeListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIFINTERNAL: Unregister the listener as a listener for the event.- Specified by:
removeListenerin interfaceEventManagerIF
-
processEvent
public void processEvent(Object object, String event, Object new_value, Object old_value)
Description copied from interface:EventListenerIFINTERNAL: A method that receives notification when an event has been triggered.- Specified by:
processEventin interfaceEventListenerIF
-
prefetchRolesByType
public void prefetchRolesByType(Collection players, TopicIF rtype, TopicIF atype)
-
getObjectByItemIdentifier
public TMObjectIF getObjectByItemIdentifier(LocatorIF locator)
-
getRolesByType
public Collection<AssociationRoleIF> getRolesByType(TopicIF player, TopicIF rtype)
-
getRolesByType
public Collection<AssociationRoleIF> getRolesByType(TopicIF player, TopicIF rtype, TopicIF atype)
-
getOccurrencesByType
public Collection<OccurrenceIF> getOccurrencesByType(TopicIF topic, TopicIF type)
-
getTopicNamesByType
public Collection<TopicNameIF> getTopicNamesByType(TopicIF topic, TopicIF type)
-
getAssocations
public Collection<AssociationIF> getAssocations(TopicIF topic)
-
getAssociationsByType
public Collection<AssociationIF> getAssociationsByType(TopicIF topic, TopicIF type)
-
-