it.eng.qbe.model
Class DataMartModel

java.lang.Object
  extended by it.eng.qbe.model.DataMartModel
All Implemented Interfaces:
java.io.Serializable

public class DataMartModel
extends java.lang.Object
implements java.io.Serializable

Author:
Andrea Zoppello This class represent contains all the information related to the datamart, it's path, the jndi name of the connection, the Hibernate Dialect used etc..
See Also:
Serialized Form

Constructor Summary
DataMartModel(java.lang.String path, java.lang.String jndiDataSourceName, java.lang.String dialect)
           
 
Method Summary
 org.hibernate.SessionFactory createSessionFactory()
          This methos is responsible to create the Hibernate Session Factory Object related to the datamart model
 IDataMartModelRetriever getDataMartModelRetriever()
           
 java.lang.String getDescription()
           
 java.lang.String getDialect()
           
 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 getLabel()
           
 java.lang.String getName()
           
 java.lang.String getPath()
           
 java.util.List getQueries()
          This method retrieve all queries for a datamart model
 ISingleDataMartWizardObject getQuery(java.lang.String queryId)
          This method retrieve the query related with the datamart model with given queryId
 IQueryPersister getQueryPersister()
           
 org.hibernate.cfg.Configuration initHibernateConfiguration(java.io.File jarFile)
           
 void persistQueryAction(ISingleDataMartWizardObject wizObj)
          This method is responsible to persist the Object wizObj using the IQueryPersister
 void setDescription(java.lang.String description)
           
 void setDialect(java.lang.String dialect)
           
 void setJndiDataSourceName(java.lang.String jndiDataSourceName)
           
 void setLabel(java.lang.String label)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataMartModel

public DataMartModel(java.lang.String path,
                     java.lang.String jndiDataSourceName,
                     java.lang.String dialect)
Parameters:
path: - The path of the datamart
jndiDataSourceName: - the name of the jndi datasource
dialect: - the dialect to use
Method Detail

getJarFile

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

Returns:
the hibernate Configuration

createSessionFactory

public org.hibernate.SessionFactory createSessionFactory()
This methos is responsible to create the Hibernate Session Factory Object related to the datamart model

Returns:
the hibernate Configuration

getHibernateConfiguration

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

initHibernateConfiguration

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

getDataMartModelRetriever

public IDataMartModelRetriever getDataMartModelRetriever()
                                                  throws java.lang.Exception
Returns:
the IDataMartModelRetriever object reading concrete implementation class from the property QBE.DATA-MART-MODEL-RETRIEVER.className in qbe.xml file
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 -

getDialect

public java.lang.String getDialect()
Returns:
dialect

setDialect

public void setDialect(java.lang.String dialect)
Parameters:
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 -

persistQueryAction

public void persistQueryAction(ISingleDataMartWizardObject wizObj)
This method is responsible to persist the Object wizObj using the IQueryPersister

Parameters:
wizObj -

getQueries

public java.util.List getQueries()
This method retrieve all queries for a datamart model

Returns:
a List of ISingleDataMartWizardObject that are all queries for a given datamart

getQuery

public ISingleDataMartWizardObject getQuery(java.lang.String queryId)
This method retrieve the query related with the datamart model with given queryId

Parameters:
queryId: - The identifier of the query to get
Returns:
ISingleDataMartWizardObject the object representing the query

getDescription

public java.lang.String getDescription()
Returns:
description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description -

getLabel

public java.lang.String getLabel()
Returns:
label

setLabel

public void setLabel(java.lang.String label)
Parameters:
label -

getName

public java.lang.String getName()
Returns:

setName

public void setName(java.lang.String name)
Parameters:
name -