org.objectweb.medor.datasource.lib
Class MedorWrapperFactory

java.lang.Object
  extended byorg.objectweb.medor.datasource.lib.MedorWrapperFactory
All Implemented Interfaces:
WrapperFactory

public class MedorWrapperFactory
extends java.lang.Object
implements WrapperFactory

A simple implementation of the WrapperFactory interface... Wrappers are used to fetch data, so the same wrapper type can be used many times.


Constructor Summary
MedorWrapperFactory()
           
 
Method Summary
 void bindDataStoreToWrapper(short dataStoreType, java.lang.Class wrapperClass)
          For a given data store type, associates a Wrapper class.
 Wrapper getWrapper(DataStore dl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MedorWrapperFactory

public MedorWrapperFactory()
Method Detail

getWrapper

public Wrapper getWrapper(DataStore dl)
                   throws DataSourceException
Specified by:
getWrapper in interface WrapperFactory
Throws:
DataSourceException

bindDataStoreToWrapper

public void bindDataStoreToWrapper(short dataStoreType,
                                   java.lang.Class wrapperClass)
                            throws DataSourceException
Description copied from interface: WrapperFactory
For a given data store type, associates a Wrapper class. This will be used by the evaluator to associate the right Wrapper to each query leaf (data store). The Wrapper class must have an empty constructor (because it is instanciated using newInstance).

Specified by:
bindDataStoreToWrapper in interface WrapperFactory
Parameters:
dataStoreType - is the type of data store (DataStore.getDataStoreType())
wrapperClass - is the java Class for the associated Wrapper.
Throws:
DataSourceException