Class DataQuerySpecifications<E extends org.n52.series.db.beans.DatasetEntity>
java.lang.Object
org.n52.sensorweb.server.db.query.QuerySpecifications
org.n52.sensorweb.server.db.query.DataQuerySpecifications<E>
public final class DataQuerySpecifications<E extends org.n52.series.db.beans.DatasetEntity>
extends QuerySpecifications
-
Field Summary
Fields inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
dbQuery, entityManager -
Method Summary
Modifier and TypeMethodDescriptionaverage(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) count(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) Optional<org.n52.series.db.beans.DataEntity>matchClosestAfterEnd(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) Optional<org.n52.series.db.beans.DataEntity>matchClosestBeforeStart(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>Matches data of datasets with given ids.org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>matchDatasets(String... ids) Matches data of datasets with given ids.org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>matchDatasets(Collection<String> ids) Matches data of datasets with given ids.Optional<org.n52.series.db.beans.DataEntity>matchEnd(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>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.DataEntity>Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchesSpatially()org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchParentsIsNull()matchesSpatially()org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchParentsIsNotNull()matchesSpatially()org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>Matches entities so that parent is not null.org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity>Matches entities so that parent is null.Optional<org.n52.series.db.beans.DataEntity>matchStart(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) org.n52.series.db.beans.DataEntitymax(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) org.n52.series.db.beans.DataEntitymin(org.n52.series.db.beans.DatasetEntity dataset, javax.persistence.EntityManager entityManager) static <E> DataQuerySpecificationsMethods inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
getIdPredicate, getTimespanEnd, getTimespanStart
-
Method Details
-
of
-
matchFilters
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchFilters()Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchesSpatially()
- Returns:
- a boolean expression matching all filter criteria
-
matchFiltersParentsIsNull
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchFiltersParentsIsNull()Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchParentsIsNull()matchesSpatially()
- Returns:
- a boolean expression matching all filter criteria
-
matchFiltersParentsNotNull
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DataEntity> matchFiltersParentsNotNull()Aggregates following filters in an AND expression:matchDatasets()matchTimespan()matchIsNotDeleted()matchParentsIsNotNull()matchesSpatially()
- Returns:
- a boolean expression matching all filter criteria
-
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
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
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 ofDbQuery.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
-