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

public final class CommandPredicates extends Object
Predicate generation helpers for querying CommandEntity.
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.persistence.criteria.Predicate
    find(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.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.

    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<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 - The Root (from) for this query
      cq - The CriteriaQuery instance this predicate is for
      cb - The CriteriaBuilder for the query
      name - The name of the command
      user - The name of the user who created the command
      statuses - The status of the command
      tags - The set of tags to search the command for
      Returns:
      A Predicate object 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 - The Root (from) for the query
      cq - The CriteriaQuery instance
      cb - The CriteriaBuilder instance
      criterion - The Criterion to match commands against
      Returns:
      A Predicate for this query