JPAQuery jpaQuery = Member.find(query.toString())
.bind("member", member)
.bind("interests", member.interests);
if (!member.links.isEmpty()) {
jpaQuery.bind("links", member.links);
}
List<Object[]> result = jpaQuery.fetch(limit);
suggestions = Lists.transform(result, MEMBER_SUGGESTIONS_FUNCTION);
}
return suggestions;