it.eng.spagobi.kpi.config.dao
Interface IKpiDAO

All Known Implementing Classes:
KpiDAOImpl

public interface IKpiDAO


Method Summary
 boolean deleteKpi(java.lang.Integer kpiId)
           
 void deleteResource(java.lang.Integer resourceId)
           
 java.lang.String getChartType(java.lang.Integer kpiInstanceID)
          Returns the ChartType of the specific KpiInstance (it could also be null)
 IDataSet getDsFromKpiId(java.lang.Integer kpiId)
          Returns the DatasetConfig for the KPI with id 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
 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.lang.Integer getPeriodicitySeconds(java.lang.Integer periodicityId)
          Returns an Integer representing the seconds of the Periodicity with id periodicityId
 java.util.List getThresholds(KpiInstance k)
          Returns a List of all the the Threshols of the KpiInstance
 java.lang.Integer insertKpi(Kpi toCreate)
           
 void insertKpiValue(KpiValue value)
          Inserts a new KPI Value with its date, value period and thresholds
 java.lang.Integer insertResource(Resource toCreate)
           
 void isAlarmingValue(KpiValue value)
          For the specific KpiValue verifies if it is ok with every threshold and if not writes an alarm event in the AlarmEvent table so that later on an alarm will be sent
 java.lang.Boolean isKpiInstUnderAlramControl(java.lang.Integer kpiInstID)
          Returns True if the KPIInstance with id kpiInstID is under AlarmControl, false if it is not
 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
 KpiInstance loadKpiInstanceById(java.lang.Integer id)
          Returns the KpiInstance of the referred id
 KpiInstance loadKpiInstanceByIdFromHistory(java.lang.Integer id, java.util.Date d)
          Returns the KpiInstance with id 'id' that was valid in date d
 java.util.List loadKpiList()
          Returns the list of Kpi.
 java.util.List loadKpiList(java.lang.String fieldOrder, java.lang.String typeOrder)
           
 ModelInstanceNode loadModelInstanceById(java.lang.Integer id, java.util.Date requestedDate)
          Returns the ModelInstance of the referred id
 Resource loadResourceById(java.lang.Integer id)
          Returns the Resource of the referred id
 java.util.List loadResourcesList(java.lang.String fieldOrder, java.lang.String typeOrder)
           
 java.util.List loadThresholdsById(java.lang.Integer id)
          Loads the list of Threshold interval for the threshold with id 'id'
 void modifyKpi(Kpi kpi)
           
 void modifyResource(Resource resource)
           
 void setKpiInstanceFromKPI(KpiInstance kpiInstance, java.lang.Integer kpiId)
           
 

Method Detail

insertKpiValue

void insertKpiValue(KpiValue value)
                    throws it.eng.spago.error.EMFUserError
Inserts a new KPI Value with its date, value period and thresholds

Parameters:
KpiValue - to insert
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadModelInstanceById

ModelInstanceNode loadModelInstanceById(java.lang.Integer id,
                                        java.util.Date requestedDate)
                                        throws it.eng.spago.error.EMFUserError
Returns the ModelInstance of the referred id

Parameters:
id - of the ModelInstance
Returns:
ModelInstance of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadKpiInstanceById

KpiInstance loadKpiInstanceById(java.lang.Integer id)
                                throws it.eng.spago.error.EMFUserError
Returns the KpiInstance of the referred id

Parameters:
id - of the KpiInstance
Returns:
KpiInstance of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadKpiInstanceByIdFromHistory

KpiInstance loadKpiInstanceByIdFromHistory(java.lang.Integer id,
                                           java.util.Date d)
                                           throws it.eng.spago.error.EMFUserError
Returns the KpiInstance with id 'id' that was valid in date d

Parameters:
id - of the KpiInstance
Date - of when the KpiInstance has to be valid
Returns:
KpiInstance of the referred id valid in date d
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadThresholdsById

java.util.List loadThresholdsById(java.lang.Integer id)
                                  throws it.eng.spago.error.EMFUserError
Loads the list of Threshold interval for the threshold with id 'id'

Parameters:
Integer - id of the threshold
Returns:
List of all the the Threshols for the threshold with id 'id'
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getThresholds

java.util.List getThresholds(KpiInstance k)
                             throws it.eng.spago.error.EMFUserError
Returns a List of all the the Threshols of the KpiInstance

Parameters:
KpiInstance - k
Returns:
List of all the the Threshols of the KpiInstance
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getKpiTrendXmlResult

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

Parameters:
Integer - resId, Integer kpiInstId, String endDate
Returns:
List of all the the Threshols of the KpiInstance
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
it.eng.spago.base.SourceBeanException

getPeriodicitySeconds

java.lang.Integer getPeriodicitySeconds(java.lang.Integer periodicityId)
                                        throws it.eng.spago.error.EMFUserError
Returns an Integer representing the seconds of the Periodicity with id periodicityId

Parameters:
Integer - periodicityId
Returns:
Integer representing the seconds of the Periodicity with id periodicityId
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadKpiById

Kpi loadKpiById(java.lang.Integer id)
                throws it.eng.spago.error.EMFUserError
Returns the Kpi of the referred id

Parameters:
id - of the Kpi
Returns:
Kpi of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadKpiDefinitionById

Kpi loadKpiDefinitionById(java.lang.Integer id)
                          throws it.eng.spago.error.EMFUserError
Returns the Kpi Definition of the referred id

Parameters:
id - of the Kpi
Returns:
Kpi of the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadResourceById

Resource loadResourceById(java.lang.Integer id)
                          throws it.eng.spago.error.EMFUserError
Returns the Resource of the referred id

Parameters:
id - of the Resource
Returns:
Resource with the referred id
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getDsFromKpiId

IDataSet getDsFromKpiId(java.lang.Integer kpiId)
                        throws it.eng.spago.error.EMFUserError
Returns the DatasetConfig for the KPI with id kpiId

Parameters:
kpiId - of the KPI
Returns:
DataSetConfig used to calculate the KPI with ID kpiId
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

getKpiValue

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

Parameters:
KpiValue -
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

isKpiInstUnderAlramControl

java.lang.Boolean isKpiInstUnderAlramControl(java.lang.Integer kpiInstID)
                                             throws it.eng.spago.error.EMFUserError
Returns True if the KPIInstance with id kpiInstID is under AlarmControl, false if it is not

Parameters:
kpiInstID - of the KPIInstance that we want to monitor
Returns:
Boolean that shows if the KPIInstance with id kpiInstID is under AlarmControl
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

isAlarmingValue

void isAlarmingValue(KpiValue value)
                     throws it.eng.spago.error.EMFUserError
For the specific KpiValue verifies if it is ok with every threshold and if not writes an alarm event in the AlarmEvent table so that later on an alarm will be sent

Parameters:
KpiValue -
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

getChartType

java.lang.String getChartType(java.lang.Integer kpiInstanceID)
                              throws it.eng.spago.error.EMFUserError
Returns the ChartType of the specific KpiInstance (it could also be null)

Parameters:
kpiInstanceID -
Returns:
Returns the ChartType of the specific KpiInstance (it could also be null)
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

loadKpiList

java.util.List loadKpiList()
                           throws it.eng.spago.error.EMFUserError
Returns the list of Kpi.

Returns:
the list of all Kpi.
Throws:
it.eng.spago.error.EMFUserError - if an Exception occurs

loadKpiList

java.util.List loadKpiList(java.lang.String fieldOrder,
                           java.lang.String typeOrder)
                           throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

modifyResource

void modifyResource(Resource resource)
                    throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

insertResource

java.lang.Integer insertResource(Resource toCreate)
                                 throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

setKpiInstanceFromKPI

void setKpiInstanceFromKPI(KpiInstance kpiInstance,
                           java.lang.Integer kpiId)
                           throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

deleteResource

void deleteResource(java.lang.Integer resourceId)
                    throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

modifyKpi

void modifyKpi(Kpi kpi)
               throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

insertKpi

java.lang.Integer insertKpi(Kpi toCreate)
                            throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

deleteKpi

boolean deleteKpi(java.lang.Integer kpiId)
                  throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

loadResourcesList

java.util.List loadResourcesList(java.lang.String fieldOrder,
                                 java.lang.String typeOrder)
                                 throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError