Class DatasetQuerySpecifications

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> hasFeature()  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isDeleted()
      Matches datasets where
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isEnabled()
      Matches datasets where
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isNotDeleted()  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isPublic()
      Aggregates following filters in an AND expression: hasFeature() isPublished() isEnabled() not isDeleted()
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isPublished()
      Matches datasets where
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchCategory()
      Matches datasets having category with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchCategory​(String... ids)
      Matches datasets having category with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchCategory​(Collection<String> ids)
      Matches datasets having category with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes()
      Matches datasets matching given dataset types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes​(String... datasetTypes)
      Matches datasets matching given dataset types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes​(Collection<String> datasetTypes)
      Matches datasets matching given dataset types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchesSpatially()
      Matches datasets which have a feature laying within the given bbox using an intersects query.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchFeatures()
      Matches datasets having features with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchFeatures​(String... ids)
      Matches datasets having features with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchFeatures​(Collection<String> ids)
      Matches datasets having features with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchFilters()
      Aggregates following filters in an AND expression: isPublic() (also an aggregate filter) matchFeatures() matchOfferings() matchPhenomena() matchProcedures() matchValueTypes() matchesSpatially()
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchId​(String id)  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchIds​(Collection<String> ids)  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchInsitu()  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchMobile()  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes()
      Matches datasets matching given observation types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes​(String... observationTypes)
      Matches datasets matching given observation types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes​(Collection<String> observationTypes)
      Matches datasets matching given observation types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchOfferings()
      Matches datasets having offerings with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchOfferings​(String... ids)
      Matches datasets having offerings with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchOfferings​(Collection<String> ids)
      Matches datasets having offerings with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPhenomena()
      Matches datasets having phenomena with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPhenomena​(String... ids)
      Matches datasets having phenomena with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPhenomena​(Collection<String> ids)
      Matches datasets having phenomena with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPlatforms()
      Matches datasets having platform with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPlatforms​(String... ids)
      Matches datasets having platform with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchPlatforms​(Collection<String> ids)
      Matches datasets having platform with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures()
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(boolean all)
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(boolean all, String... ids)
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(String... ids)
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(Collection<String> ids)
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(Collection<String> ids, boolean all)
      Matches datasets having procedures with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchServices()
      Matches datasets having service with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchServices​(String... ids)
      Matches datasets having service with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchServices​(Collection<String> ids)
      Matches datasets having service with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchTag()
      Matches datasets having Tag with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchTag​(String... ids)
      Matches datasets having Tag with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchTag​(Collection<String> ids)
      Matches datasets having Tag with given ids.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes()
      Matches datasets matching given value types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes​(String... valueTypes)
      Matches datasets matching given value types.
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes​(Collection<String> valueTypes)
      Matches datasets matching given value types.
      static DatasetQuerySpecifications of​(DbQuery dbQuery, javax.persistence.EntityManager entityManager)  
      org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> toSubquery​(org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> filter)  
    • Method Detail

      • toSubquery

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> toSubquery​(org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> filter)
        Parameters:
        filter - a filter each selected dataset have to match
        Returns:
        a subquery selection only public datasets.
      • isPublic

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isPublic()
        Aggregates following filters in an AND expression:
        Returns:
        a boolean expression
      • hasFeature

        protected org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> hasFeature()
      • isPublished

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isPublished()
        Matches datasets where
          where published
         
        Returns:
        a boolean expression
      • isEnabled

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isEnabled()
        Matches datasets where
          where not disabled
         
        Returns:
        a boolean expression
      • isDeleted

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isDeleted()
        Matches datasets where
          where deleted
         
        Returns:
        a boolean expression
      • isNotDeleted

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isNotDeleted()
      • matchInsitu

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchInsitu()
      • matchMobile

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchMobile()
      • matchOfferings

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

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

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

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

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

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

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

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(boolean all)
        Matches datasets having procedures with given ids.
        Parameters:
        all - true to include referenced procedures
        Returns:
        a boolean expression
        See Also:
        matchProcedures(Collection)
      • matchProcedures

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

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchProcedures​(boolean all,
                                                                                                                        String... ids)
        Matches datasets having procedures with given ids.
        Parameters:
        all - true to include referenced procedures
        ids - the ids to match
        Returns:
        a boolean expression
        See Also:
        matchProcedures(Collection)
      • matchProcedures

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes()
        Matches datasets matching given dataset types.
        Returns:
        a boolean expression
        See Also:
        matchDatasetTypes(Collection)
      • matchDatasetTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes​(String... datasetTypes)
        Matches datasets matching given dataset types.
        Parameters:
        datasetTypes - the dataset types to match
        Returns:
        a boolean expression
        See Also:
        matchDatasetTypes(Collection)
      • matchDatasetTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchDatasetTypes​(Collection<String> datasetTypes)
        Matches datasets matching given dataset types. For example:
          where datasetType in (<datasetTypes>)
         
        Parameters:
        datasetTypes - the dataset types to match
        Returns:
        a boolean expression or null when given dataset types are null or empty
      • matchObservationTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes()
        Matches datasets matching given observation types.
        Returns:
        a boolean expression
        See Also:
        matchObservationTypes(Collection)
      • matchObservationTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes​(String... observationTypes)
        Matches datasets matching given observation types.
        Parameters:
        observationTypes - the observation types to match
        Returns:
        a boolean expression
        See Also:
        matchObservationTypes(Collection)
      • matchObservationTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchObservationTypes​(Collection<String> observationTypes)
        Matches datasets matching given observation types. For example:
          where observationType in (<observationTypes>)
         
        Parameters:
        observationTypes - the observation types to match
        Returns:
        a boolean expression or null when given observation types are null or empty
      • matchValueTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes()
        Matches datasets matching given value types.
        Returns:
        a boolean expression
        See Also:
        matchValueTypes(Collection)
      • matchValueTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes​(String... valueTypes)
        Matches datasets matching given value types.
        Parameters:
        valueTypes - the value types to match
        Returns:
        a boolean expression
        See Also:
        matchValueTypes(Collection)
      • matchValueTypes

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchValueTypes​(Collection<String> valueTypes)
        Matches datasets matching given value types. For example:
          where valueType in (<valueTypes>)
         
        Parameters:
        valueTypes - the value types to match
        Returns:
        a boolean expression or null when given value types are null or empty
      • matchId

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchId​(String id)
      • matchIds

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchIds​(Collection<String> ids)
      • matchesSpatially

        public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> 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