it.eng.qbe.datasource
Class HibernateDataSource
java.lang.Object
it.eng.qbe.datasource.BasicDataSource
it.eng.qbe.datasource.HibernateDataSource
- All Implemented Interfaces:
- IDataSource
public class HibernateDataSource
- extends BasicDataSource
- Author:
- Andrea Gioia
Constructor Summary |
HibernateDataSource(java.lang.String path,
java.lang.String jndiDataSourceName,
java.lang.String dialect)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateDataSource
public HibernateDataSource(java.lang.String path,
java.lang.String jndiDataSourceName,
java.lang.String dialect)
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)