Class JobPredicates
java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.queries.predicates.JobPredicates
Predicate helpers for querying JobEntity.-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.persistence.criteria.PredicategetFindPredicate(javax.persistence.criteria.Root<JobEntity> root, javax.persistence.criteria.CriteriaBuilder cb, String id, String name, String user, Set<String> statuses, Set<String> tags, String clusterName, ClusterEntity cluster, String commandName, CommandEntity command, Instant minStarted, Instant maxStarted, Instant minFinished, Instant maxFinished, String grouping, String groupingInstance) Generate a criteria query predicate for a where clause based on the given parameters.
-
Method Details
-
getFindPredicate
public static javax.persistence.criteria.Predicate getFindPredicate(javax.persistence.criteria.Root<JobEntity> root, javax.persistence.criteria.CriteriaBuilder cb, @Nullable String id, @Nullable String name, @Nullable String user, @Nullable Set<String> statuses, @Nullable Set<String> tags, @Nullable String clusterName, @Nullable ClusterEntity cluster, @Nullable String commandName, @Nullable CommandEntity command, @Nullable Instant minStarted, @Nullable Instant maxStarted, @Nullable Instant minFinished, @Nullable Instant maxFinished, @Nullable String grouping, @Nullable String groupingInstance) Generate a criteria query predicate for a where clause based on the given parameters.- Parameters:
root- The root to usecb- The criteria builder to useid- The job idname- The job nameuser- The user who created the jobstatuses- The job statusestags- The tags for the jobs to findclusterName- The cluster namecluster- The cluster the job should have been run oncommandName- The command namecommand- The command the job should have been run withminStarted- The time which the job had to start after in order to be return (inclusive)maxStarted- The time which the job had to start before in order to be returned (exclusive)minFinished- The time which the job had to finish after in order to be return (inclusive)maxFinished- The time which the job had to finish before in order to be returned (exclusive)grouping- The job grouping to search forgroupingInstance- The job grouping instance to search for- Returns:
- The specification
-