it.eng.qbe.datasource
Class HibernateDataSource

java.lang.Object
  extended by it.eng.qbe.datasource.BasicDataSource
      extended by it.eng.qbe.datasource.HibernateDataSource
All Implemented Interfaces:
IDataSource

public class HibernateDataSource
extends BasicDataSource

Author:
Andrea Gioia

Field Summary
 
Fields inherited from interface it.eng.qbe.datasource.IDataSource
HIBERNATE_DS_TYPE
 
Constructor Summary
HibernateDataSource(java.lang.String path, java.lang.String jndiDataSourceName, java.lang.String dialect)
           
 
Method Summary
 java.util.List getAlreadyAddedView()
           
 IDataMartModelRetriever getDataMartModelRetriever()
           
 java.lang.String getDialect()
           
 org.hibernate.cfg.Configuration getHibCfg()
          Deprecated. use getHibernateConfiguration()
 org.hibernate.cfg.Configuration getHibernateConfiguration()
           
 org.hibernate.cfg.Configuration getHibernateConfiguration(java.io.File jarFile)
           
 java.io.File getJarFile()
          This methos is responsible to retrieve the phisical jar file wich contains the datamart
 java.lang.String getJndiDataSourceName()
           
 java.lang.String getPath()
           
 IQueryPersister getQueryPersister()
           
 org.hibernate.SessionFactory getSessionFactory()
           
 java.util.List getViewJarFiles()
           
 org.hibernate.cfg.Configuration initHibernateConfiguration(java.io.File jarFile)
           
 boolean isClassLoaderExtended()
           
 void setAlreadyAddedView(java.util.List alreadyAddedView)
           
 void setClassLoaderExtended(boolean classLoaderExtended)
           
 void setDialect(java.lang.String dialect)
           
 void setHibCfg(org.hibernate.cfg.Configuration hibCfg)
          Deprecated. external bbject cannot set the configuration
 void setJndiDataSourceName(java.lang.String jndiDataSourceName)
           
 void setPath(java.lang.String path)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 void updateCurrentClassLoader()
          This method retrieve the jarFile of the datamart and update the Thread Context ClassLoader adding this jar
static void updateCurrentClassLoader(java.io.File jarFile)
          This method update the Thread Context ClassLoader adding to the class loader the jarFile
 
Methods inherited from class it.eng.qbe.datasource.BasicDataSource
getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateDataSource

public HibernateDataSource(java.lang.String path,
                           java.lang.String jndiDataSourceName,
                           java.lang.String dialect)
Method Detail

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

getHibernateConfiguration

public org.hibernate.cfg.Configuration getHibernateConfiguration(java.io.File jarFile)

getHibernateConfiguration

public org.hibernate.cfg.Configuration getHibernateConfiguration()

initHibernateConfiguration

public org.hibernate.cfg.Configuration initHibernateConfiguration(java.io.File jarFile)

getJarFile

public java.io.File getJarFile()
This methos is responsible to retrieve the phisical jar file wich contains the datamart

Returns:
the hibernate Configuration

getDataMartModelRetriever

public IDataMartModelRetriever getDataMartModelRetriever()
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getQueryPersister

public IQueryPersister getQueryPersister()
                                  throws java.lang.Exception
Returns:
the IQueryPersister object reading concrete implementation class from the property QBE.QUERY-PERSISTER.className in qbe.xml file
Throws:
java.lang.Exception

updateCurrentClassLoader

public static void updateCurrentClassLoader(java.io.File jarFile)
This method update the Thread Context ClassLoader adding to the class loader the jarFile

Parameters:
jarFile -

updateCurrentClassLoader

public void updateCurrentClassLoader()
This method retrieve the jarFile of the datamart and update the Thread Context ClassLoader adding this jar

Parameters:
jarFile -

getViewJarFiles

public java.util.List getViewJarFiles()

getDialect

public java.lang.String getDialect()

setDialect

public void setDialect(java.lang.String dialect)

getJndiDataSourceName

public java.lang.String getJndiDataSourceName()
Returns:
jndiDataSourceName

setJndiDataSourceName

public void setJndiDataSourceName(java.lang.String jndiDataSourceName)
Parameters:
jndiDataSourceName -

getPath

public java.lang.String getPath()
Returns:
path

setPath

public void setPath(java.lang.String path)
Parameters:
path -

getHibCfg

public org.hibernate.cfg.Configuration getHibCfg()
Deprecated. use getHibernateConfiguration()


setHibCfg

public void setHibCfg(org.hibernate.cfg.Configuration hibCfg)
Deprecated. external bbject cannot set the configuration


isClassLoaderExtended

public boolean isClassLoaderExtended()

setClassLoaderExtended

public void setClassLoaderExtended(boolean classLoaderExtended)

getAlreadyAddedView

public java.util.List getAlreadyAddedView()

setAlreadyAddedView

public void setAlreadyAddedView(java.util.List alreadyAddedView)

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)