public static Specification<JpaDistributionSet> assignedTarget(final String assignedTargetId) {
        return (dsRoot, query, cb) -> {
            final ListJoin<JpaDistributionSet, JpaTarget> assignedTargetJoin = dsRoot
                    .join(JpaDistributionSet_.assignedToTargets, JoinType.INNER);
            return cb.equal(assignedTargetJoin.get(JpaTarget_.controllerId), assignedTargetId);
        };
    }
public static Specification < JpaDistributionSet > assignedTarget ( final String assignedTargetId ) { return ( dsRoot , query , cb ) -> { final ListJoin < JpaDistributionSet , JpaTarget > assignedTargetJoin = dsRoot . join ( JpaDistributionSet_ . assignedToTargets , JoinType . INNER ) ; return cb . equal ( assignedTargetJoin . get ( JpaTarget_ . controllerId ) , assignedTargetId ) ; } ; }
@param assignedTargetId
the targetID which is assigned to a distribution set to search
for.
@return the specification to search for a distribution set which is
assigned to the given targetId