it.eng.qbe.datasource
Class AbstractHibernateDataSource

java.lang.Object
  extended by it.eng.qbe.datasource.AbstractDataSource
      extended by it.eng.qbe.datasource.AbstractHibernateDataSource
All Implemented Interfaces:
IDataSource, IHibernateDataSource
Direct Known Subclasses:
BasicHibernateDataSource, CompositeHibernateDataSource

public abstract class AbstractHibernateDataSource
extends AbstractDataSource
implements IHibernateDataSource

The Class AbstractHibernateDataSource.


Field Summary
 
Fields inherited from interface it.eng.qbe.datasource.IDataSource
COMPOSITE_HIBERNATE_DS_TYPE, HIBERNATE_DS_TYPE
 
Constructor Summary
AbstractHibernateDataSource()
           
 
Method Summary
protected  void addDbLink(java.lang.String dmName, org.hibernate.cfg.Configuration srcCfg, org.hibernate.cfg.Configuration dstCfg)
          Adds the db link.
protected  org.hibernate.cfg.Configuration buildEmptyConfiguration()
          Builds the empty configuration.
 DBConnection getConnection()
          Gets the connection.
protected  java.io.File getDatamartJarFile(java.lang.String datamartName)
          Gets the datamart jar file.
 java.lang.String getDatamartName()
          Gets the datamart name.
 java.util.List getDatamartNames()
          Gets the datamart names.
 java.util.Map getDblinkMap()
          Gets the dblink map.
 Formula getFormula()
          Gets the formula.
protected  java.io.File getViewJarFile(java.lang.String datamartName, java.lang.String viewName)
          Gets the view jar file.
protected  java.util.List getViewNames(java.lang.String datamartName)
          Gets the view names.
protected  java.io.File loadFormulaFile(java.lang.String datamartName)
          Load formula file.
 void setConnection(DBConnection connection)
          Sets the connection.
 void setDatamartName(java.lang.String datamartName)
          Sets the datamart name.
 void setDatamartNames(java.util.List datamartNames)
          Sets the datamart names.
 void setDblinkMap(java.util.Map dblinkMap)
          Sets the dblink map.
 void setFormula(Formula formula)
          Sets the formula.
protected static void updateCurrentClassLoader(java.io.File jarFile)
          Update current class loader.
 
Methods inherited from class it.eng.qbe.datasource.AbstractDataSource
getName, getProperties, getType, setName, setProperties, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.qbe.datasource.IHibernateDataSource
getConfiguration, getSessionFactory, getSessionFactory, refresh, refreshDatamartViews, refreshSharedView, refreshSharedViews
 
Methods inherited from interface it.eng.qbe.datasource.IDataSource
getName, getProperties, getType, setProperties
 

Constructor Detail

AbstractHibernateDataSource

public AbstractHibernateDataSource()
Method Detail

buildEmptyConfiguration

protected org.hibernate.cfg.Configuration buildEmptyConfiguration()
Builds the empty configuration.

Returns:
the configuration

getDatamartName

public java.lang.String getDatamartName()
Description copied from interface: IHibernateDataSource
Gets the datamart name.

Specified by:
getDatamartName in interface IHibernateDataSource
Returns:
the datamart name

setDatamartName

public void setDatamartName(java.lang.String datamartName)
Sets the datamart name.

Parameters:
datamartName - the new datamart name

getDatamartJarFile

protected java.io.File getDatamartJarFile(java.lang.String datamartName)
Gets the datamart jar file.

Parameters:
datamartName - the datamart name
Returns:
the datamart jar file

getViewNames

protected java.util.List getViewNames(java.lang.String datamartName)
Gets the view names.

Parameters:
datamartName - the datamart name
Returns:
the view names

getViewJarFile

protected java.io.File getViewJarFile(java.lang.String datamartName,
                                      java.lang.String viewName)
Gets the view jar file.

Parameters:
datamartName - the datamart name
viewName - the view name
Returns:
the view jar file

loadFormulaFile

protected java.io.File loadFormulaFile(java.lang.String datamartName)
Load formula file.

Parameters:
datamartName - the datamart name
Returns:
the file

updateCurrentClassLoader

protected static void updateCurrentClassLoader(java.io.File jarFile)
Update current class loader.

Parameters:
jarFile - the jar file

getConnection

public DBConnection getConnection()
Description copied from interface: IHibernateDataSource
Gets the connection.

Specified by:
getConnection in interface IHibernateDataSource
Returns:
the connection

setConnection

public void setConnection(DBConnection connection)
Sets the connection.

Parameters:
connection - the new connection

getDatamartNames

public java.util.List getDatamartNames()
Description copied from interface: IHibernateDataSource
Gets the datamart names.

Specified by:
getDatamartNames in interface IHibernateDataSource
Returns:
the datamart names

setDatamartNames

public void setDatamartNames(java.util.List datamartNames)
Sets the datamart names.

Parameters:
datamartNames - the new datamart names

getDblinkMap

public java.util.Map getDblinkMap()
Gets the dblink map.

Returns:
the dblink map

setDblinkMap

public void setDblinkMap(java.util.Map dblinkMap)
Sets the dblink map.

Parameters:
dblinkMap - the new dblink map

addDbLink

protected void addDbLink(java.lang.String dmName,
                         org.hibernate.cfg.Configuration srcCfg,
                         org.hibernate.cfg.Configuration dstCfg)
Adds the db link.

Parameters:
dmName - the dm name
srcCfg - the src cfg
dstCfg - the dst cfg

getFormula

public Formula getFormula()
Description copied from interface: IHibernateDataSource
Gets the formula.

Specified by:
getFormula in interface IHibernateDataSource
Returns:
the formula

setFormula

public void setFormula(Formula formula)
Description copied from interface: IHibernateDataSource
Sets the formula.

Specified by:
setFormula in interface IHibernateDataSource
Parameters:
formula - the new formula