if (rs.next()) {
MeasurementAggregate measurementAggregate = fillAggregateFromResultSet(rs);
return measurementAggregate;
}
throw new MeasurementNotFoundException("Data not found");
} catch (SQLException e) {
throw new MeasurementNotFoundException(e);
} finally {
JDBCUtil.safeClose(connection, ps, rs);
}
}