Package be.gaudry.dao.brolmeter
Interface IMeter
- All Known Implementing Classes:
DerbyMeter
,DevMeter
,DevVehicleMeter
,HibMeter
public interface IMeter
Provide some persistent methods on
Meters
- Since:
- 1.0 Mar 15, 2009
- Author:
- Steph GAUDRY
-
Method Summary
Modifier and TypeMethodDescriptiongetHouse(int id)
loadMeter(int meterId)
Loads measures for a given meter identifier and a given year.loadMeter(int meterId, int year)
Loads measures for a given meter identifier and a given year.int
saveMeasure(Measure measure)
int
-
Method Details
-
getHouse
-
getDefaultHouse
House getDefaultHouse() -
loadMeter
Loads measures for a given meter identifier and a given year.- Parameters:
meterId
-- Returns:
-
loadMeter
Loads measures for a given meter identifier and a given year.
Only measures matching the given year are loaded, and the first measure of the following month. The first measure of the following month is needed to compute consumption of the last month of the given year.- Parameters:
meterId
-year
- the requested year, or-1
to return all measures.- Returns:
-
saveMeter
- Parameters:
meter
- Meter to save- Returns:
- meter id
- Throws:
javax.transaction.NotSupportedException
-
saveMeasure
- Parameters:
measure
- to save- Returns:
- measure id
- Throws:
javax.transaction.NotSupportedException
-