java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.queries.predicates.ClusterPredicates

public final class ClusterPredicates extends Object
Predicate generation helpers for querying ClusterEntity.
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.persistence.criteria.Predicate
    find(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.AbstractQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, String name, Set<String> statuses, Set<TagEntity> tags, Instant minUpdateTime, Instant maxUpdateTime)
    Generate a Predicate given the parameters.
    static javax.persistence.criteria.Predicate
    findClustersMatchingAnyCriterion(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, Set<com.netflix.genie.common.internal.dtos.Criterion> criteria)
    Get the specification for the query which will find the clusters which match any of the given criterion.
    static javax.persistence.criteria.Predicate
    findClustersMatchingCriterion(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, com.netflix.genie.common.internal.dtos.Criterion criterion)
    Get the Predicate for the query which will find the clusters which match the given criterion.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • find

      public static javax.persistence.criteria.Predicate find(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.AbstractQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, @Nullable String name, @Nullable Set<String> statuses, @Nullable Set<TagEntity> tags, @Nullable Instant minUpdateTime, @Nullable Instant maxUpdateTime)
      Generate a Predicate given the parameters.
      Parameters:
      root - The Root of the query
      cq - The CriteriaQuery
      cb - The CriteriaBuilder
      name - The name of the cluster to find
      statuses - The statuses of the clusters to find
      tags - The tags of the clusters to find
      minUpdateTime - The minimum updated time of the clusters to find
      maxUpdateTime - The maximum updated time of the clusters to find
      Returns:
      The Predicate representing these parameters
    • findClustersMatchingCriterion

      public static javax.persistence.criteria.Predicate findClustersMatchingCriterion(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, com.netflix.genie.common.internal.dtos.Criterion criterion)
      Get the Predicate for the query which will find the clusters which match the given criterion.
      Parameters:
      root - The Root of the query
      cq - The CriteriaQuery
      cb - The CriteriaBuilder
      criterion - The Criterion to match clusters against
      Returns:
      A Predicate for this query
    • findClustersMatchingAnyCriterion

      public static javax.persistence.criteria.Predicate findClustersMatchingAnyCriterion(javax.persistence.criteria.Root<ClusterEntity> root, javax.persistence.criteria.CriteriaQuery<?> cq, javax.persistence.criteria.CriteriaBuilder cb, Set<com.netflix.genie.common.internal.dtos.Criterion> criteria)
      Get the specification for the query which will find the clusters which match any of the given criterion.
      Parameters:
      root - The Root of the query
      cq - The CriteriaQuery
      cb - The CriteriaBuilder
      criteria - The set of Criterion to match clusters against
      Returns:
      A Specification for this query