|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore net.ontopia.topicmaps.impl.rdbms.RDBMSTopicMapStore
public class RDBMSTopicMapStore
PUBLIC: The rdbms topic map store implementation.
Field Summary | |
---|---|
protected java.util.Map |
properties
|
protected java.lang.String |
propfile
|
protected RDBMSStorage |
storage
|
protected boolean |
storage_local
|
protected RDBMSTopicMapTransaction |
transaction
|
protected static java.lang.Class[] |
types
|
Fields inherited from class net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore |
---|
base_address, closed, deleted, open, readonly, readonlySet, reference, topic_listeners |
Fields inherited from interface net.ontopia.topicmaps.core.TopicMapStoreIF |
---|
IN_MEMORY_IMPLEMENTATION, RDBMS_IMPLEMENTATION |
Constructor Summary | |
---|---|
RDBMSTopicMapStore()
PUBLIC: Creates a new topic map store without a specified database property file. |
|
RDBMSTopicMapStore(long topicmap_id)
PUBLIC: Creates a new topic map store without a specified database property file. |
|
RDBMSTopicMapStore(java.util.Map properties)
PUBLIC: Creates a new topic map store with the specified database properties. |
|
RDBMSTopicMapStore(java.util.Map properties,
long topicmap_id)
PUBLIC: Creates a new topic map store with the specified database properties. |
|
RDBMSTopicMapStore(StorageIF storage)
INTERNAL: |
|
RDBMSTopicMapStore(StorageIF storage,
long topicmap_id)
INTERNAL: |
|
RDBMSTopicMapStore(java.lang.String propfile)
PUBLIC: Creates a new topic map store with the database property file set. |
|
RDBMSTopicMapStore(java.lang.String propfile,
long topicmap_id)
PUBLIC: Creates a new topic map store with the database property file set. |
Method Summary | |
---|---|
void |
abort()
PUBLIC: Aborts and deactivates the top-level transaction; all changes made inside the root transaction are lost. |
void |
clear()
|
void |
clearCache()
INTERNAL: Empties the shared RDBMS caches. |
void |
close()
PUBLIC: Closes the store and aborts the transaction if active. |
void |
close(boolean returnStore)
|
void |
commit()
PUBLIC: Commits and deactivates the top-level transaction. |
void |
delete(boolean force)
PUBLIC: Deletes the TopicMapIF from the data store. |
void |
evictObject(java.lang.String object_id)
INTERNAL: Evicts the given object from the shared RDBMS caches. |
protected void |
finalize()
|
void |
flush()
|
LocatorIF |
getBaseAddress()
PUBLIC: Gets a locator of the topic map in the store. |
java.sql.Connection |
getConnection()
|
ConnectionFactoryIF |
getConnectionFactory(boolean readonly)
|
EventManagerIF |
getEventManager()
|
protected IdentityIF |
getIdentityForObjectId(TransactionIF txn,
java.lang.String object_id)
|
int |
getImplementation()
PUBLIC: Returns the topic map implementation identifier. |
long |
getLongId()
|
long |
getLongId(TMObjectIF o)
|
java.lang.String |
getProperty(java.lang.String name)
INTERNAL: Gets the value of the specified store property. |
java.lang.String |
getQueryString(java.lang.String name)
|
RDBMSStorage |
getStorage()
INTERNAL: Returns the proxy storage implementation used by the topic map store. |
TopicMapIF |
getTopicMap()
PUBLIC: Gets the topic map that is accessible through the root transaction of the store. |
TopicMapTransactionIF |
getTransaction()
|
TransactionIF |
getTransactionIF()
|
boolean |
isTransactional()
PUBLIC: Returns true if the store supports transactions. |
boolean |
prefetch(int type,
int[] fields,
boolean[] traverse,
java.util.Collection objects)
|
boolean |
prefetch(int type,
int field,
boolean traverse,
java.util.Collection objects)
|
boolean |
prefetchFieldsById(java.util.Collection object_ids,
int field)
|
boolean |
prefetchObjectsById(java.util.Collection object_ids)
|
void |
prefetchRolesByType(java.util.Collection players,
TopicIF rtype,
TopicIF atype)
|
void |
setBaseAddress(LocatorIF base_address)
EXPERIMENTAL: Sets the persistent base address of the store. |
void |
setBaseAddressOverride(LocatorIF base_address)
INTERNAL: Sets the apparent base address of the store. |
boolean |
validate()
|
void |
writeIdentityMap(java.io.Writer out,
boolean dump)
EXPERIMENTAL: Dumps the identity map to the given writer. |
void |
writeReport(java.lang.String filename,
boolean dumpCaches)
EXPERIMENTAL: Writes a cache statistics report to the given file. |
void |
writeReport(java.io.Writer out,
boolean dumpCaches)
EXPERIMENTAL: Writes a cache statistics report to the given writer. |
Methods inherited from class net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore |
---|
getReference, isOpen, isReadOnly, open, setReadOnly, setReference, setTopicListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RDBMSStorage storage
protected java.lang.String propfile
protected java.util.Map properties
protected RDBMSTopicMapTransaction transaction
protected boolean storage_local
protected static final java.lang.Class[] types
Constructor Detail |
---|
public RDBMSTopicMapStore() throws java.io.IOException
java.io.IOException
public RDBMSTopicMapStore(long topicmap_id) throws java.io.IOException
java.io.IOException
public RDBMSTopicMapStore(java.lang.String propfile) throws java.io.IOException
propfile
- Path reference to a Java properties file.
java.io.IOException
public RDBMSTopicMapStore(java.lang.String propfile, long topicmap_id) throws java.io.IOException
propfile
- Path reference to a Java properties file.topicmap_id
- The ID of the topic map in the database.
java.io.IOException
public RDBMSTopicMapStore(java.util.Map properties) throws java.io.IOException
java.io.IOException
public RDBMSTopicMapStore(java.util.Map properties, long topicmap_id) throws java.io.IOException
java.io.IOException
public RDBMSTopicMapStore(StorageIF storage)
public RDBMSTopicMapStore(StorageIF storage, long topicmap_id)
Method Detail |
---|
public RDBMSStorage getStorage()
public int getImplementation()
TopicMapStoreIF
TopicMapStoreIF.IN_MEMORY_IMPLEMENTATION
or TopicMapStoreIF.RDBMS_IMPLEMENTATION
flags.public boolean isTransactional()
TopicMapStoreIF
public LocatorIF getBaseAddress()
TopicMapStoreIF
getBaseAddress
in interface TopicMapStoreIF
getBaseAddress
in class AbstractTopicMapStore
public void setBaseAddress(LocatorIF base_address)
TopicMapStoreIF
public void setBaseAddressOverride(LocatorIF base_address)
public TransactionIF getTransactionIF()
public TopicMapTransactionIF getTransaction()
getTransaction
in class AbstractTopicMapStore
public TopicMapIF getTopicMap()
TopicMapStoreIF
getTopicMap
in interface TopicMapStoreIF
getTopicMap
in class AbstractTopicMapStore
public void commit()
TopicMapStoreIF
commit
in interface TopicMapStoreIF
commit
in class AbstractTopicMapStore
public void abort()
TopicMapStoreIF
abort
in interface TopicMapStoreIF
abort
in class AbstractTopicMapStore
public void clear()
public void delete(boolean force) throws NotRemovableException
TopicMapStoreIF
If the force flag is false and the topic map contains any objects, i.e. topics and associations, a NotRemovableException will be thrown. The topic map will not be modified or closed if this is so.
If the force flag is true, the topic map will be deleted even if it contains any objects.
Note: if you're retrieved the store via a TopicMapReferenceIF then call delete(boolean) on the reference instead.
delete
in interface TopicMapStoreIF
delete
in class AbstractTopicMapStore
NotRemovableException
public java.lang.String getProperty(java.lang.String name)
protected void finalize()
finalize
in class java.lang.Object
public void close()
TopicMapStoreIF
public void close(boolean returnStore)
close
in class AbstractTopicMapStore
public boolean validate()
validate
in class AbstractTopicMapStore
public void evictObject(java.lang.String object_id)
public void clearCache()
public void writeReport(java.lang.String filename, boolean dumpCaches) throws java.io.IOException
filename
- the name of the file to write the report todumpCaches
- whether to include detailed cache dumps
java.io.IOException
public void writeReport(java.io.Writer out, boolean dumpCaches) throws java.io.IOException
out
- the writer to write the report todumpCaches
- whether to include detailed cache dumps
java.io.IOException
public void writeIdentityMap(java.io.Writer out, boolean dump) throws java.io.IOException
out
- the writer to write the report to
java.io.IOException
public boolean prefetchObjectsById(java.util.Collection object_ids)
public boolean prefetchFieldsById(java.util.Collection object_ids, int field)
protected IdentityIF getIdentityForObjectId(TransactionIF txn, java.lang.String object_id)
public boolean prefetch(int type, int field, boolean traverse, java.util.Collection objects)
public boolean prefetch(int type, int[] fields, boolean[] traverse, java.util.Collection objects)
public void prefetchRolesByType(java.util.Collection players, TopicIF rtype, TopicIF atype)
public long getLongId()
public long getLongId(TMObjectIF o)
public void flush()
public java.sql.Connection getConnection()
public ConnectionFactoryIF getConnectionFactory(boolean readonly)
public java.lang.String getQueryString(java.lang.String name)
public EventManagerIF getEventManager()
getEventManager
in class AbstractTopicMapStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |