Class CountDataRepository

  • All Implemented Interfaces:
    TimeOutputCreator, ValueAssembler<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>, DataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>, org.springframework.beans.factory.InitializingBean

    public class CountDataRepository
    extends AbstractNumericalDataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
    • Method Detail

      • createEmptyValue

        protected org.n52.io.response.dataset.count.CountValue createEmptyValue()
        Specified by:
        createEmptyValue in class AbstractDataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
      • getFirstValue

        public org.n52.io.response.dataset.count.CountValue getFirstValue​(org.n52.series.db.beans.DatasetEntity entity,
                                                                          DbQuery query)
        Specified by:
        getFirstValue in interface ValueAssembler<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
        Overrides:
        getFirstValue in class AbstractDataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
        Parameters:
        entity - the dataset entity
        query - the query
        Returns:
        the first value for the given dataset
      • getLastValue

        public org.n52.io.response.dataset.count.CountValue getLastValue​(org.n52.series.db.beans.DatasetEntity entity,
                                                                         DbQuery query)
        Specified by:
        getLastValue in interface ValueAssembler<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
        Overrides:
        getLastValue in class AbstractDataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
        Parameters:
        entity - the dataset entity
        query - the query
        Returns:
        the last value for the given dataset
      • assembleData

        protected org.n52.io.response.dataset.Data<org.n52.io.response.dataset.count.CountValue> assembleData​(Long dataset,
                                                                                                              DbQuery query,
                                                                                                              org.hibernate.Session session)
        Specified by:
        assembleData in class AbstractDataRepository<org.n52.series.db.beans.CountDataEntity,​org.n52.io.response.dataset.count.CountValue,​Integer>
      • assembleDataValue

        public org.n52.io.response.dataset.count.CountValue assembleDataValue​(org.n52.series.db.beans.CountDataEntity observation,
                                                                              org.n52.series.db.beans.DatasetEntity series,
                                                                              DbQuery query)
        Description copied from interface: ValueAssembler
        Assembles an output for a data entity for a given query.
        Parameters:
        observation - the single data entity to assemble
        series - the dataset the data entity belongs to
        query - the query
        Returns:
        the assembled output