Package be.gaudry.dao.brolmeter.derby
Class DerbyMeter
java.lang.Object
be.gaudry.dao.brolmeter.derby.DerbyMeter
- All Implemented Interfaces:
IMeter
- Since:
- 1.0 Sep 29, 2009
- Author:
- Steph GAUDRY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHouse(int id)
getLazyHouse(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
Saves house informations and insert all the metersint
saveLazyHouse(House house)
Saves only house informations (not the meters)int
saveLazyMeter(Meter meter)
int
saveMeasure(Measure measure)
int
void
updateLazyMeter(Meter meter)
Updates the meter informations, but not saves the measures
-
Constructor Details
-
DerbyMeter
public DerbyMeter()
-
-
Method Details
-
getHouse
-
getDefaultHouse
- Specified by:
getDefaultHouse
in interfaceIMeter
-
getLazyHouse
-
saveHouse
Saves house informations and insert all the meters- Parameters:
house
-
-
saveLazyHouse
Saves only house informations (not the meters)- Parameters:
house
-
-
loadMeter
Description copied from interface:IMeter
Loads measures for a given meter identifier and a given year. -
loadMeter
Description copied from interface:IMeter
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. -
saveMeter
-
updateLazyMeter
Updates the meter informations, but not saves the measures- Parameters:
meter
-
-
saveLazyMeter
-
saveMeasure
- Specified by:
saveMeasure
in interfaceIMeter
- Parameters:
measure
- to save- Returns:
- measure id
-