org.objectweb.medor.datasource.lib
Class ConnectionFactoryDataStore

java.lang.Object
  extended byorg.objectweb.medor.datasource.lib.BasicDataStore
      extended byorg.objectweb.medor.datasource.lib.ConnectionFactoryDataStore
All Implemented Interfaces:
DataStore

public class ConnectionFactoryDataStore
extends BasicDataStore

This implementation of the DataStore interface could be used in all cases where a data store could be identified by a connection factory. The reference is not typed in order to support various connection factory ( javax.sql.Datasource, javax.resource.cci.ConnectionFactory, ...)

Author:
S.Chassande-Barrioz

Field Summary
protected  java.lang.Object connectionFactory
           
 
Fields inherited from interface org.objectweb.medor.datasource.api.DataStore
JDBC_STORE, MEDORTC_STORE, ODMG_STORE, TEXTFILE_STORE, UDDI_STORE, XMLDOCUMENT_STORE
 
Constructor Summary
ConnectionFactoryDataStore(short dataStoreType, java.lang.String sourceName, short[] capabilities, java.lang.Object cf)
          It builds a ConnectionFactoryDataStore.
 
Method Summary
 java.lang.Object getConnectionFactory()
           
 boolean isSameAs(DataStore ds)
          Two ConnectionFactoryDataStore with the same connection factory are equals.
 
Methods inherited from class org.objectweb.medor.datasource.lib.BasicDataStore
getClientName, getDataStoreType, getName, isCapable, setClientName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionFactory

protected java.lang.Object connectionFactory
Constructor Detail

ConnectionFactoryDataStore

public ConnectionFactoryDataStore(short dataStoreType,
                                  java.lang.String sourceName,
                                  short[] capabilities,
                                  java.lang.Object cf)
                           throws DataSourceException
It builds a ConnectionFactoryDataStore.

Parameters:
dataStoreType - is the type of the DataStore (ex: DataStore.JDBC_STORE)
sourceName - is the name of the datastore
capabilities - is the capabilities of the datastore
cf - is the connection factory (cannot be null)
Throws:
DataSourceException - if the specified connection factory is null.
Method Detail

getConnectionFactory

public java.lang.Object getConnectionFactory()

isSameAs

public boolean isSameAs(DataStore ds)
Two ConnectionFactoryDataStore with the same connection factory are equals.

Specified by:
isSameAs in interface DataStore
Overrides:
isSameAs in class BasicDataStore