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 long
actual_id
protected Map
listeners
protected ObjectTreeManager
otree
protected boolean
readonly
protected RoleTypeAssocTypeCache
rtatcache
protected RoleTypeCache
rtcache
protected SubjectIdentityCache
sicache
protected TopicEvents
te
protected TopicModificationManager
topicmods
protected TransactionIF
txn
-
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 void
abort()
PUBLIC: Aborts the transaction; all changes made inside the transaction are rolled back.void
abort(boolean invalidate)
void
addListener(EventListenerIF listener, String event)
INTERNAL: Register the listener as a listener for the event.void
commit()
PUBLIC: Commits the transaction.TopicMapTransactionIF
createNested()
long
getActualId()
Collection<AssociationIF>
getAssocations(TopicIF topic)
Collection<AssociationIF>
getAssociationsByType(TopicIF topic, TopicIF type)
TMObjectIF
getObjectByItemIdentifier(LocatorIF locator)
ObjectTreeManager
getObjectTreeManager()
Collection<OccurrenceIF>
getOccurrencesByType(TopicIF topic, TopicIF type)
Collection<AssociationRoleIF>
getRolesByType(TopicIF player, TopicIF rtype)
Collection<AssociationRoleIF>
getRolesByType(TopicIF player, TopicIF rtype, TopicIF atype)
TopicIF
getTopicBySubjectIdentifier(LocatorIF locator)
TopicIF
getTopicBySubjectLocator(LocatorIF locator)
TopicMapIF
getTopicMap()
PUBLIC: Gets the topic map that is accessible through the transaction.Collection<TopicNameIF>
getTopicNamesByType(TopicIF topic, TopicIF type)
TransactionIF
getTransaction()
INTERNAL: Returns the proxy transaction used by the topic map transaction.void
prefetchRolesByType(Collection players, TopicIF rtype, TopicIF atype)
void
processEvent(Object object, String event, Object new_value, Object old_value)
INTERNAL: A method that receives notification when an event has been triggered.void
removeListener(EventListenerIF listener, String event)
INTERNAL: Unregister the listener as a listener for the event.String
toString()
boolean
validate()
-
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: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 interfaceTopicMapTransactionIF
- Overrides:
commit
in classAbstractTopicMapTransaction
-
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 interfaceTopicMapTransactionIF
- Overrides:
abort
in classAbstractTopicMapTransaction
-
abort
public void abort(boolean invalidate)
- Overrides:
abort
in classAbstractTopicMapTransaction
-
validate
public boolean validate()
- Specified by:
validate
in classAbstractTopicMapTransaction
-
createNested
public TopicMapTransactionIF createNested()
- Overrides:
createNested
in classAbstractTopicMapTransaction
-
getTransaction
public TransactionIF getTransaction()
INTERNAL: Returns the proxy transaction used by the topic map transaction.
-
getTopicMap
public TopicMapIF getTopicMap()
Description copied from interface:TopicMapTransactionIF
PUBLIC: Gets the topic map that is accessible through the transaction.- Specified by:
getTopicMap
in interfaceTopicMapTransactionIF
- Overrides:
getTopicMap
in classAbstractTopicMapTransaction
- Returns:
- The topic map in the transaction; an object implementing TopicMapIF.
-
addListener
public void addListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIF
INTERNAL: Register the listener as a listener for the event.- Specified by:
addListener
in interfaceEventManagerIF
-
removeListener
public void removeListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIF
INTERNAL: Unregister the listener as a listener for the event.- Specified by:
removeListener
in interfaceEventManagerIF
-
processEvent
public void processEvent(Object object, String event, Object new_value, Object old_value)
Description copied from interface:EventListenerIF
INTERNAL: A method that receives notification when an event has been triggered.- Specified by:
processEvent
in 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)
-
-