/** * Return the {@link UserOrg} corresponding to the given attribute/value without using cache for the query, but * using it to resolve the user. * * @param attribute * the attribute name to match. * @param value * the attribute value to match. * @return the found user or <code>null</code> when not found. Groups are not fetched for this operation. */ default UserOrg findOneBy(final String attribute, final String value) { return findAllBy(attribute, value).stream().findFirst().orElse(null); }
/** * Return the {@link UserOrg} list corresponding to the given attribute/value without using cache for the search, * but using it for the instances. * * @param attribute * The attribute name to match. * @param value * The attribute value to match. * @return the found users. May be empty. */ public List<UserOrg> findAllBy(final String attribute, final String value) { return getUser().findAllBy(attribute, value); }