Class UserIsNotShadowedPredicate

java.lang.Object
com.atlassian.jira.security.groups.UserIsNotShadowedPredicate
All Implemented Interfaces:
Function<QUser,com.querydsl.core.types.dsl.BooleanExpression>

public class UserIsNotShadowedPredicate extends Object implements Function<QUser,com.querydsl.core.types.dsl.BooleanExpression>
This class builds BooleanExpression instances that can be used to filter a QueryDSL query based on user shadowing rules and a collection of directory ids.
  • Constructor Details

    • UserIsNotShadowedPredicate

      public UserIsNotShadowedPredicate(@Nonnull Collection<Long> higherPriorityDirectoryIds)
  • Method Details

    • apply

      @Nullable public com.querydsl.core.types.dsl.BooleanExpression apply(QUser u)
      Build a predicate that will only include users if this directory is their canonical directory. i.e. ignore users that are shadowed by a higher priority directory.

      This method can return null if a predicate is not necessary. QueryDSL will gracefully ignore the null predicate.

      Specified by:
      apply in interface Function<QUser,com.querydsl.core.types.dsl.BooleanExpression>
      Parameters:
      u - the user table
      Returns:
      the predicate, or null if there are no higher priority directories.