Class DataQuerySpecifications<E extends org.n52.series.db.beans.DatasetEntity>


  • public final class DataQuerySpecifications<E extends org.n52.series.db.beans.DatasetEntity>
    extends QuerySpecifications
    • Method Detail

      • matchIsNotDeleted

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchIsNotDeleted()
      • matchParentsIsNull

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchParentsIsNull()
        Matches entities so that parent is null.
        Returns:
        a boolean expression
      • matchParentsIsNotNull

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchParentsIsNotNull()
        Matches entities so that parent is not null.
        Returns:
        a boolean expression
      • matchDatasets

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchDatasets()
        Matches data of datasets with given ids.
        Returns:
        a boolean expression
        See Also:
        matchDatasets(Collection)
      • matchDatasets

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchDatasets​(String... ids)
        Matches data of datasets with given ids.
        Parameters:
        ids - the ids to match
        Returns:
        a boolean expression
        See Also:
        matchDatasets(Collection)
      • matchDatasets

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchDatasets​(Collection<String> ids)
        Matches data of datasets with given ids. For example:
          where dataset.id in (<ids>)
         
        In case of DbQuery.isMatchDomainIds() returns true the following query path will be used:
          where dataset.identifier in (<ids>)
         
        Parameters:
        ids - the ids to match
        Returns:
        a boolean expression or null when given ids are null or empty
      • matchStart

        public Optional<org.n52.series.db.beans.DataEntity> matchStart​(org.n52.series.db.beans.DatasetEntity dataset,
                                                                       javax.persistence.EntityManager entityManager)
      • matchEnd

        public Optional<org.n52.series.db.beans.DataEntity> matchEnd​(org.n52.series.db.beans.DatasetEntity dataset,
                                                                     javax.persistence.EntityManager entityManager)
      • matchClosestBeforeStart

        public Optional<org.n52.series.db.beans.DataEntity> matchClosestBeforeStart​(org.n52.series.db.beans.DatasetEntity dataset,
                                                                                    javax.persistence.EntityManager entityManager)
      • matchClosestAfterEnd

        public Optional<org.n52.series.db.beans.DataEntity> matchClosestAfterEnd​(org.n52.series.db.beans.DatasetEntity dataset,
                                                                                 javax.persistence.EntityManager entityManager)
      • count

        public Long count​(org.n52.series.db.beans.DatasetEntity dataset,
                          javax.persistence.EntityManager entityManager)
      • min

        public org.n52.series.db.beans.DataEntity min​(org.n52.series.db.beans.DatasetEntity dataset,
                                                      javax.persistence.EntityManager entityManager)
      • max

        public org.n52.series.db.beans.DataEntity max​(org.n52.series.db.beans.DatasetEntity dataset,
                                                      javax.persistence.EntityManager entityManager)
      • average

        public BigDecimal average​(org.n52.series.db.beans.DatasetEntity dataset,
                                  javax.persistence.EntityManager entityManager)
      • matchesSpatially

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchesSpatially()
        Matches datasets which have a feature laying within the given bbox using an intersects query. For example:
           where ST_INTERSECTS(feature.geom, <filter_geometry>)=1
         
        Returns:
        a boolean expression or null when given spatial filter is null or empty