net.ontopia.persistence.proxy
Class RDBMSStorage

java.lang.Object
  extended by net.ontopia.persistence.proxy.RDBMSStorage
All Implemented Interfaces:
StorageIF

public class RDBMSStorage
extends java.lang.Object
implements StorageIF

INTERNAL: A storage definition implementation for relational databases.


Field Summary
protected  java.util.Map qcmap
           
 
Constructor Summary
RDBMSStorage()
          INTERNAL: Creates a storage definition which gets its settings from system variables.
RDBMSStorage(java.util.Map properties)
          INTERNAL: Creates a storage definition that reads its settings from the specified properties.
RDBMSStorage(java.lang.String propfile)
          INTERNAL: Creates a storage definition that reads its settings from the specified property file.
 
Method Summary
 void clearCache()
           
 void clearCache(IdentityIF namespace)
           
 void close()
          INTERNAL: Closes the storage definition, which allows it to free its resources.
 StorageAccessIF createAccess(boolean readonly)
           
 QueryIF createQuery(JDOQuery jdoquery, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar, boolean lookup_identities)
           
 QueryIF createQuery(java.lang.String name, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar)
           
 TransactionIF createTransaction(boolean readonly)
          INTERNAL: Creates a new storage access instance.
 IdentityIF generateIdentity(java.lang.Object type)
           
 ConnectionFactoryIF getConnectionFactory(boolean readonly)
           
 java.lang.String getDatabase()
          INTERNAL: Returns the database type.
 java.lang.Object getHelperObject(int identifier, IdentityIF namespace)
          INTERNAL: Returns the shared caches.
protected  java.io.InputStream getInputStream(java.lang.String property, java.lang.String filename)
           
 RDBMSMapping getMapping()
          INTERNAL: Returns the optimized object relational mapping declaration.
 java.lang.String[] getPlatforms()
          INTERNAL: Returns the database platforms.
 java.util.Map getProperties()
          INTERNAL: Gets the properties held by the storage.
 java.lang.String getProperty(java.lang.String property)
          INTERNAL: Gets the value of the specified storage property.
 java.lang.String getProperty(java.lang.String property, java.lang.String default_value)
           
protected  QueryDescriptor getQueryDescriptor(java.lang.String name)
           
 java.lang.String getQueryString(java.lang.String name)
           
 SQLGeneratorIF getSQLGenerator()
           
 StorageCacheIF getStorageCache()
          INTERNAL: Returns the shared storage cache, if any.
protected  void init(java.util.Map properties)
          INTERNAL: Method shared by constructors to properly initialize members.
 boolean isSharedCache()
          INTERNAL: Returns true if shared cache is enabled.
 void notifyCluster()
          INTERNAL: Notify cluster that transaction has been committed, so that batched cluster events can be broadcasted.
 void writeReport(java.io.Writer out, TopicMapReferenceIF reference, IdentityIF namespace, boolean dumpCaches)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qcmap

protected java.util.Map qcmap
Constructor Detail

RDBMSStorage

public RDBMSStorage()
             throws java.io.IOException
INTERNAL: Creates a storage definition which gets its settings from system variables.

Throws:
java.io.IOException

RDBMSStorage

public RDBMSStorage(java.lang.String propfile)
             throws java.io.IOException
INTERNAL: Creates a storage definition that reads its settings from the specified property file.

Throws:
java.io.IOException

RDBMSStorage

public RDBMSStorage(java.util.Map properties)
             throws java.io.IOException
INTERNAL: Creates a storage definition that reads its settings from the specified properties.

Throws:
java.io.IOException
Since:
1.2.4
Method Detail

getInputStream

protected java.io.InputStream getInputStream(java.lang.String property,
                                             java.lang.String filename)
                                      throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

init

protected void init(java.util.Map properties)
             throws java.io.IOException
INTERNAL: Method shared by constructors to properly initialize members.

Throws:
java.io.IOException

getMapping

public RDBMSMapping getMapping()
Description copied from interface: StorageIF
INTERNAL: Returns the optimized object relational mapping declaration.

Specified by:
getMapping in interface StorageIF

generateIdentity

public IdentityIF generateIdentity(java.lang.Object type)

getProperties

public java.util.Map getProperties()
Description copied from interface: StorageIF
INTERNAL: Gets the properties held by the storage.

Specified by:
getProperties in interface StorageIF

getProperty

public java.lang.String getProperty(java.lang.String property)
Description copied from interface: StorageIF
INTERNAL: Gets the value of the specified storage property.

Specified by:
getProperty in interface StorageIF

getProperty

public java.lang.String getProperty(java.lang.String property,
                                    java.lang.String default_value)

createAccess

public StorageAccessIF createAccess(boolean readonly)

createTransaction

public TransactionIF createTransaction(boolean readonly)
Description copied from interface: StorageIF
INTERNAL: Creates a new storage access instance.

Specified by:
createTransaction in interface StorageIF

isSharedCache

public boolean isSharedCache()
Description copied from interface: StorageIF
INTERNAL: Returns true if shared cache is enabled.

Specified by:
isSharedCache in interface StorageIF

getStorageCache

public StorageCacheIF getStorageCache()
Description copied from interface: StorageIF
INTERNAL: Returns the shared storage cache, if any.

Specified by:
getStorageCache in interface StorageIF

getDatabase

public java.lang.String getDatabase()
INTERNAL: Returns the database type.


getPlatforms

public java.lang.String[] getPlatforms()
INTERNAL: Returns the database platforms.


close

public void close()
Description copied from interface: StorageIF
INTERNAL: Closes the storage definition, which allows it to free its resources.

Specified by:
close in interface StorageIF

notifyCluster

public void notifyCluster()
Description copied from interface: StorageIF
INTERNAL: Notify cluster that transaction has been committed, so that batched cluster events can be broadcasted.

Specified by:
notifyCluster in interface StorageIF

getHelperObject

public java.lang.Object getHelperObject(int identifier,
                                        IdentityIF namespace)
Description copied from interface: StorageIF
INTERNAL: Returns the shared caches.

Specified by:
getHelperObject in interface StorageIF

getQueryString

public java.lang.String getQueryString(java.lang.String name)

getQueryDescriptor

protected QueryDescriptor getQueryDescriptor(java.lang.String name)

createQuery

public QueryIF createQuery(java.lang.String name,
                           RDBMSAccess access,
                           ObjectAccessIF oaccess,
                           AccessRegistrarIF registrar)

createQuery

public QueryIF createQuery(JDOQuery jdoquery,
                           RDBMSAccess access,
                           ObjectAccessIF oaccess,
                           AccessRegistrarIF registrar,
                           boolean lookup_identities)

getSQLGenerator

public SQLGeneratorIF getSQLGenerator()

getConnectionFactory

public ConnectionFactoryIF getConnectionFactory(boolean readonly)

clearCache

public void clearCache()

clearCache

public void clearCache(IdentityIF namespace)

writeReport

public void writeReport(java.io.Writer out,
                        TopicMapReferenceIF reference,
                        IdentityIF namespace,
                        boolean dumpCaches)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.