1
package org.hisp.dhis.rt.dataaccess;
4
* Copyright (c) 2004-2007, University of Oslo
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
* * Redistributions of source code must retain the above copyright notice, this
10
* list of conditions and the following disclaimer.
11
* * Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions and the following disclaimer in the documentation
13
* and/or other materials provided with the distribution.
14
* * Neither the name of the HISP project nor the names of its contributors may
15
* be used to endorse or promote products derived from this software without
16
* specific prior written permission.
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
import java.util.Collection;
31
import java.util.Date;
34
import org.hisp.dhis.dataelement.DataElement;
35
import org.hisp.dhis.dataelement.DataElementGroup;
36
import org.hisp.dhis.indicator.Indicator;
37
import org.hisp.dhis.indicator.IndicatorGroup;
38
import org.hisp.dhis.organisationunit.OrganisationUnit;
41
* @author Lars Helge Overland
42
* @version $Id: ReportDataAccess.java 2871 2007-02-20 16:04:11Z andegje $
44
public interface ReportDataAccess
46
String BEAN_ID = ReportDataAccess.class.getName();
49
* Retrieves all DataElements.
51
* @throws ReportDataAccessException
53
Collection<DataElement> getAllDataElements()
54
throws ReportDataAccessException;
57
* Retrieves all DataElementGroups.
59
* @throws ReportDataAccessException
61
Collection<DataElementGroup> getAllDataElementGroups()
62
throws ReportDataAccessException;
65
* Retrieves members of DataElementGroup.
67
* @throws ReportDataAccessException
69
Collection<DataElement> getMembersOfDataElementGroup( int dataElementGroupId )
70
throws ReportDataAccessException;
73
* Retrieves all Indicators.
75
* @throws ReportDataAccessException
77
Collection<Indicator> getAllIndicators()
78
throws ReportDataAccessException;
81
* Retrieves all IndicatorGroups.
83
* @throws ReportDataAccessException
85
Collection<IndicatorGroup> getAllIndicatorGroups()
86
throws ReportDataAccessException;
89
* Retrieves members of IndicatorGroup.
91
* @throws ReportDataAccessException
93
Collection<Indicator> getMembersOfIndicatorGroup( int indicatorGroupId )
94
throws ReportDataAccessException;
97
* Calculates the aggregated value of the given DataElement and source
98
* between start date and end date.
100
* @throws ReportDataAccessException
102
double getAggregatedDataValue( int dataElementId, Date startDate, Date endDate, String source )
103
throws ReportDataAccessException;
106
* Calculates the aggregated value of the given Indicator and source between
107
* start date and end date.
109
* @throws ReportDataAccessException
111
double getAggregatedIndicatorValue( int indicatorId, Date startDate, Date endDate, String source )
112
throws ReportDataAccessException;
115
* Gets the name of the Organisation Unit with the given identifier.
117
* @throws ReportDataAccessException
119
String getOrganisationUnitName( int organisationUnitId )
120
throws ReportDataAccessException;
123
* Gets the short-name of the Organisation Unit with the given identifier.
125
* @throws ReportDataAccessException
127
String getOrganisationUnitShortName( int organisationUnitId )
128
throws ReportDataAccessException;
131
* Gets the name of the DataElement with the given identifier.
133
* @throws ReportDataAccessException
135
String getDataElementName( int dataElementId )
136
throws ReportDataAccessException;
139
* Gets the short name of the DataElement with the given identifier.
141
* @throws ReportDataAccessException
143
String getDataElementShortName( int dataElementId )
144
throws ReportDataAccessException;
147
* Gets the name of the Indicator with the given identifier.
149
* @throws ReportDataAccessException
151
String getIndicatorName( int indicatorId )
152
throws ReportDataAccessException;
155
* Gets the short name of the Indicator with the given identifier.
157
* @throws ReportDataAccessException
159
String getIndicatorShortName( int indicatorId )
160
throws ReportDataAccessException;
163
* Add this menthod for Hue's report.
165
Set<OrganisationUnit> getOrganisationUnitChildren( int organisationUnitId )
166
throws ReportDataAccessException;
168
int getOrganisationUnitByName( String name )
169
throws ReportDataAccessException;