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;
33
import org.hisp.dhis.dataelement.DataElement;
34
import org.hisp.dhis.dataelement.DataElementGroup;
35
import org.hisp.dhis.dataset.DataSet;
36
import org.hisp.dhis.indicator.Indicator;
37
import org.hisp.dhis.indicator.IndicatorGroup;
40
* @author Lars Helge Overland
41
* @version $Id: ReportDataAccess.java 2871 2007-02-20 16:04:11Z andegje $
43
public interface ReportDataAccess
45
String BEAN_ID = ReportDataAccess.class.getName();
48
* Retrieves all DataElements.
49
* @throws ReportDataAccessException
51
Collection<DataElement> getAllDataElements()
52
throws ReportDataAccessException;
55
* Retrieves DataElement.
56
* @throws ReportDataAccessException
58
DataElement getDataElement(int dataElmentId)
59
throws ReportDataAccessException;
62
* Retrieves all DataElementGroups.
63
* @throws ReportDataAccessException
65
Collection<DataElementGroup> getAllDataElementGroups()
66
throws ReportDataAccessException;
69
* Retrieves members of DataElementGroup.
70
* @throws ReportDataAccessException
72
Collection<DataElement> getMembersOfDataElementGroup( int dataElementGroupId )
73
throws ReportDataAccessException;
76
* Retrieves all Indicators.
77
* @throws ReportDataAccessException
79
Collection<Indicator> getAllIndicators()
80
throws ReportDataAccessException;
83
* Retrieves all IndicatorGroups.
84
* @throws ReportDataAccessException
86
Collection<IndicatorGroup> getAllIndicatorGroups()
87
throws ReportDataAccessException;
90
* 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 between start date and end date.
98
* @throws ReportDataAccessException
100
double getAggregatedDataValue( int dataElementId, Date startDate, Date endDate, String source )
101
throws ReportDataAccessException;
104
* Calculates the aggregated value of the given Indicator and source between start date and end date.
105
* @throws ReportDataAccessException
107
double getAggregatedIndicatorValue( int indicatorId, Date startDate, Date endDate, String source )
108
throws ReportDataAccessException;
111
* Gets the name of the Organisation Unit with the given identifier.
112
* @throws ReportDataAccessException
114
String getOrganisationUnitName( int organisationUnitId )
115
throws ReportDataAccessException;
118
* Gets the short-name of the Organisation Unit with the given identifier.
119
* @throws ReportDataAccessException
121
String getOrganisationUnitShortName( int organisationUnitId )
122
throws ReportDataAccessException;
125
* Gets the children of the Organisation Unit with the given identifer.
126
* @throws ReportDataAccessException
128
Collection<Integer> getChildrenOfOrganisationUnit( int organisationUnitId )
129
throws ReportDataAccessException;
132
* 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.
140
* @throws ReportDataAccessException
142
String getDataElementShortName( int dataElementId )
143
throws ReportDataAccessException;
146
* Gets the name of the Indicator with the given identifier.
147
* @throws ReportDataAccessException
149
String getIndicatorName( int indicatorId )
150
throws ReportDataAccessException;
153
* Gets the short name of the Indicator with the given identifier.
154
* @throws ReportDataAccessException
156
String getIndicatorShortName( int indicatorId )
157
throws ReportDataAccessException;
160
* Gets the DataSet with the given identifier.
161
* @throws ReportDataAccessException
163
public DataSet getDataSet( int dataSetId )
164
throws ReportDataAccessException;
167
* Gets all of DataSets.
168
* @throws ReportDataAccessException
170
Collection<DataSet> getAllDataSets()
171
throws ReportDataAccessException;
174
* Gets all of Semi DataSets.
175
* @throws ReportDataAccessException
177
Collection<DataSet> getAllSemiDataSets()
178
throws ReportDataAccessException;