it.eng.spagobi.kpi.config.dao
Class KpiDAOImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.kpi.config.dao.KpiDAOImpl
All Implemented Interfaces:
IKpiDAO

public class KpiDAOImpl
extends AbstractHibernateDAO
implements IKpiDAO


Constructor Summary
KpiDAOImpl()
           
 
Method Summary
 boolean deleteKpi(java.lang.Integer kpiId)
           
 KpiValue getDisplayKpiValue(java.lang.Integer kpiInstanceId, java.util.Date d, Resource r)
          The last KpiValue for the the KpiInstance selected, for the resource selected, in the date selected or before
 it.eng.spagobi.tools.dataset.bo.IDataSet getDsFromKpiId(java.lang.Integer kpiId)
           
 java.lang.String getKpiTrendXmlResult(java.lang.Integer resId, java.lang.Integer kpiInstId, java.util.Date endDate)
          Returns a List of all the the Threshols of the KpiInstance
 java.lang.String getKpiTrendXmlResult(java.lang.Integer resId, java.lang.Integer kpiInstId, java.util.Date beginDate, java.util.Date endDate)
          Returns a List of all the the Threshols of the KpiInstance
 KpiValue getKpiValue(java.lang.Integer kpiInstanceId, java.util.Date d, Resource r)
          KpiValue valid for the the KpiInstance selected, for the resource selected, in the date selected
 java.util.List getKpiValue(SbiKpiInstance kpi, java.util.Date d)
           
 java.lang.Integer insertKpi(Kpi kpi)
           
 void insertKpiValue(KpiValue value)
          Inserts a new KPI Value with its date, value period and thresholds
 Kpi loadKpiById(java.lang.Integer id)
          Returns the Kpi of the referred id
 Kpi loadKpiDefinitionById(java.lang.Integer id)
          Returns the Kpi Definition of the referred id
 java.util.List loadKpiList()
          Returns the list of Kpi.
 java.util.List loadKpiList(java.lang.String fieldOrder, java.lang.String typeOrder)
           
 void modifyKpi(Kpi kpi)
           
 Kpi toKpi(SbiKpi kpi)
           
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KpiDAOImpl

public KpiDAOImpl()
Method Detail

loadKpiDefinitionById

public Kpi loadKpiDefinitionById(java.lang.Integer id)
                          throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
Returns the Kpi Definition of the referred id

Specified by:
loadKpiDefinitionById in interface IKpiDAO
Parameters:
id - of the Kpi
Returns:
Kpi of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadKpiById

public Kpi loadKpiById(java.lang.Integer id)
                throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
Returns the Kpi of the referred id

Specified by:
loadKpiById in interface IKpiDAO
Parameters:
id - of the Kpi
Returns:
Kpi of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getKpiTrendXmlResult

public java.lang.String getKpiTrendXmlResult(java.lang.Integer resId,
                                             java.lang.Integer kpiInstId,
                                             java.util.Date endDate)
                                      throws it.eng.spago.base.SourceBeanException
Description copied from interface: IKpiDAO
Returns a List of all the the Threshols of the KpiInstance

Specified by:
getKpiTrendXmlResult in interface IKpiDAO
Returns:
List of all the the Threshols of the KpiInstance
Throws:
it.eng.spago.base.SourceBeanException

getKpiTrendXmlResult

public java.lang.String getKpiTrendXmlResult(java.lang.Integer resId,
                                             java.lang.Integer kpiInstId,
                                             java.util.Date beginDate,
                                             java.util.Date endDate)
                                      throws it.eng.spago.base.SourceBeanException
Description copied from interface: IKpiDAO
Returns a List of all the the Threshols of the KpiInstance

Specified by:
getKpiTrendXmlResult in interface IKpiDAO
Returns:
List of all the the Threshols of the KpiInstance
Throws:
it.eng.spago.base.SourceBeanException

getKpiValue

public java.util.List getKpiValue(SbiKpiInstance kpi,
                                  java.util.Date d)
                           throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

insertKpiValue

public void insertKpiValue(KpiValue value)
                    throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
Inserts a new KPI Value with its date, value period and thresholds

Specified by:
insertKpiValue in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getKpiValue

public KpiValue getKpiValue(java.lang.Integer kpiInstanceId,
                            java.util.Date d,
                            Resource r)
                     throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
KpiValue valid for the the KpiInstance selected, for the resource selected, in the date selected

Specified by:
getKpiValue in interface IKpiDAO
Returns:
KpiValue valid for the the KpiInstance selected, for the resource selected, in the date selected
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

getDisplayKpiValue

public KpiValue getDisplayKpiValue(java.lang.Integer kpiInstanceId,
                                   java.util.Date d,
                                   Resource r)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
The last KpiValue for the the KpiInstance selected, for the resource selected, in the date selected or before

Specified by:
getDisplayKpiValue in interface IKpiDAO
Returns:
The last KpiValue valid for the the KpiInstance selected, for the resource selected, in the date selected or before
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

toKpi

public Kpi toKpi(SbiKpi kpi)
          throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

loadKpiList

public java.util.List loadKpiList(java.lang.String fieldOrder,
                                  java.lang.String typeOrder)
                           throws it.eng.spago.error.EMFUserError
Specified by:
loadKpiList in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError

loadKpiList

public java.util.List loadKpiList()
                           throws it.eng.spago.error.EMFUserError
Description copied from interface: IKpiDAO
Returns the list of Kpi.

Specified by:
loadKpiList in interface IKpiDAO
Returns:
the list of all Kpi.
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

modifyKpi

public void modifyKpi(Kpi kpi)
               throws it.eng.spago.error.EMFUserError
Specified by:
modifyKpi in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError

insertKpi

public java.lang.Integer insertKpi(Kpi kpi)
                            throws it.eng.spago.error.EMFUserError
Specified by:
insertKpi in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError

deleteKpi

public boolean deleteKpi(java.lang.Integer kpiId)
                  throws it.eng.spago.error.EMFUserError
Specified by:
deleteKpi in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError

getDsFromKpiId

public it.eng.spagobi.tools.dataset.bo.IDataSet getDsFromKpiId(java.lang.Integer kpiId)
                                                        throws it.eng.spago.error.EMFUserError
Specified by:
getDsFromKpiId in interface IKpiDAO
Throws:
it.eng.spago.error.EMFUserError