SingleStatisticMapRepository.java from Tea Stats at Krugle
Show SingleStatisticMapRepository.java syntax highlighted
package net.time4tea.webstats.statistic.repo;
import net.time4tea.webstats.jms.EnvironmentException;
import net.time4tea.webstats.statistic.StatisticMap;
import org.joda.time.Instant;
import java.util.Collection;
/**
* Originally richja 20-Jun-2007
*/
public class SingleStatisticMapRepository implements StatisticMapRepository {
private StatisticMapRepository statisticMapRepository;
public SingleStatisticMapRepository(StatisticMapRepository statisticMapRepository) {
this.statisticMapRepository = statisticMapRepository;
}
public StatisticMap getStatisticMapForInstant(String name, Instant instant) throws EnvironmentException {
return statisticMapRepository.getStatisticMapForInstant(name, new Instant(0));
}
public Collection<StatisticMap> findAll() throws EnvironmentException {
return statisticMapRepository.findAll();
}
public Collection<Instant> findPeriodsAvailableForNamedMap(String name) throws EnvironmentException {
return statisticMapRepository.findPeriodsAvailableForNamedMap(name);
}
public void sync() throws EnvironmentException {
statisticMapRepository.sync();
}
}
See more files for this project here