Class DatasetQuerySpecifications
java.lang.Object
org.n52.sensorweb.server.db.query.QuerySpecifications
org.n52.sensorweb.server.db.query.ParameterQuerySpecifications
org.n52.sensorweb.server.db.query.DatasetQuerySpecifications
-
Field Summary
Fields inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
dbQuery, entityManager -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>Matches datasets whereorg.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>Matches datasets whereorg.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>isPublic()Aggregates following filters in an AND expression:hasFeature()isPublished()isEnabled()notisDeleted()org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>Matches datasets whereorg.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>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>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>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>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>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>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>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>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>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>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>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>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>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>matchTag()Matches datasets having Tag with given ids.org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>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>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.org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity>static DatasetQuerySpecificationsorg.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) Methods inherited from class org.n52.sensorweb.server.db.query.ParameterQuerySpecifications
matchLikeidentifier, matchLikeName, matchLikeProperty, matchServices, matchServices, matchsLikeMethods inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
getIdPredicate, getTimespanEnd, getTimespanStart
-
Method Details
-
of
public static DatasetQuerySpecifications of(DbQuery dbQuery, javax.persistence.EntityManager entityManager) -
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.
-
matchFilters
public 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()
- Returns:
- a boolean expression matching all filter criteria
-
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 wherewhere published
- Returns:
- a boolean expression
-
isEnabled
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isEnabled()Matches datasets wherewhere not disabled
- Returns:
- a boolean expression
-
isDeleted
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isDeleted()Matches datasets wherewhere deleted
- Returns:
- a boolean expression
-
isNotDeleted
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isNotDeleted() -
notNullIdentifier
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> notNullIdentifier() -
isNotHidden
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> isNotHidden() -
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
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
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 ofDbQuery.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
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
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 ofDbQuery.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
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-trueto include referenced procedures- Returns:
- a boolean expression
- See Also:
-
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
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-trueto include referenced proceduresids- the ids to match- Returns:
- a boolean expression
- See Also:
-
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 ofDbQuery.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 ofDbQuery.isMatchDomainIds()returns true the following query path will be used:where procedure.identifier in (<ids>)
- Parameters:
ids- the ids to matchall-trueto 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
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
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 ofDbQuery.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
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
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 ofDbQuery.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
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
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 ofDbQuery.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
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
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 ofDbQuery.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.- Overrides:
matchServicesin classParameterQuerySpecifications- Returns:
- a boolean expression
- See Also:
-
matchServices
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> matchServices(String... ids) Matches datasets having service with given ids.- Overrides:
matchServicesin classParameterQuerySpecifications- Parameters:
ids- the ids to match- Returns:
- a boolean expression
- See Also:
-
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
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
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
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
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
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
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
-