Class CommandPredicates
java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.queries.predicates.CommandPredicates
Predicate generation helpers for querying CommandEntity.-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.persistence.criteria.Predicatefind(javax.persistence.criteria.Root<CommandEntity> root, javax.persistence.criteria.AbstractQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, String name, String user, Set<String> statuses, Set<TagEntity> tags) Get a predicate using the specified parameters.static javax.persistence.criteria.PredicatefindCommandsMatchingCriterion(javax.persistence.criteria.Root<CommandEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, com.netflix.genie.common.internal.dtos.Criterion criterion) Get the specification for the query which will find the commands which match the given criterion.
-
Method Details
-
find
public static javax.persistence.criteria.Predicate find(javax.persistence.criteria.Root<CommandEntity> root, javax.persistence.criteria.AbstractQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, @Nullable String name, @Nullable String user, @Nullable Set<String> statuses, @Nullable Set<TagEntity> tags) Get a predicate using the specified parameters.- Parameters:
root- TheRoot(from) for this querycq- TheCriteriaQueryinstance this predicate is forcb- TheCriteriaBuilderfor the queryname- The name of the commanduser- The name of the user who created the commandstatuses- The status of the commandtags- The set of tags to search the command for- Returns:
- A
Predicateobject used for querying
-
findCommandsMatchingCriterion
public static javax.persistence.criteria.Predicate findCommandsMatchingCriterion(javax.persistence.criteria.Root<CommandEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, com.netflix.genie.common.internal.dtos.Criterion criterion) Get the specification for the query which will find the commands which match the given criterion.- Parameters:
root- TheRoot(from) for the querycq- TheCriteriaQueryinstancecb- TheCriteriaBuilderinstancecriterion- TheCriterionto match commands against- Returns:
- A
Predicatefor this query
-