Class ServiceQuerySpecifications
- java.lang.Object
-
- org.n52.sensorweb.server.db.query.QuerySpecifications
-
- org.n52.sensorweb.server.db.query.ParameterQuerySpecifications
-
- org.n52.sensorweb.server.db.query.ServiceQuerySpecifications
-
public final class ServiceQuerySpecifications extends ParameterQuerySpecifications
-
-
Field Summary
-
Fields inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
dbQuery, entityManager
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.n52.series.db.beans.DescribableEntity>
org.springframework.data.jpa.domain.Specification<T>matchServices(Collection<String> ids)Matches datasets having service with given ids.static ServiceQuerySpecificationsof(DbQuery dbQuery)org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.ServiceEntity>selectFrom(org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> filter)Matches service included in a result of a given filter, i.e.-
Methods inherited from class org.n52.sensorweb.server.db.query.ParameterQuerySpecifications
matchServices, matchServices, matchServices, of
-
Methods inherited from class org.n52.sensorweb.server.db.query.QuerySpecifications
getIdPredicate, getTimespanEnd, getTimespanStart
-
-
-
-
Method Detail
-
of
public static ServiceQuerySpecifications of(DbQuery dbQuery)
-
selectFrom
public org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.ServiceEntity> selectFrom(org.springframework.data.jpa.domain.Specification<org.n52.series.db.beans.DatasetEntity> filter)
Matches service included in a result of a given filter, i.e.where id in (select fk_service_id from dataset where <filter>)
- Parameters:
filter- the query- Returns:
- a boolean expression
-
matchServices
public <T extends org.n52.series.db.beans.DescribableEntity> org.springframework.data.jpa.domain.Specification<T> matchServices(Collection<String> ids)
Description copied from class:ParameterQuerySpecificationsMatches datasets having service with given ids. For example:where service.id in (<ids>)
In case ofDbQuery.isMatchDomainIds()returns true the following query path will be used:where service.identifier in (<ids>)
- Overrides:
matchServicesin classParameterQuerySpecifications- Parameters:
ids- the ids to match- Returns:
- a boolean expression or null when given ids are null or empty
-
-