}
protected void setGroups(List<String> groupIds) {
query.setGroups(null);
for (String groupId : groupIds) {
GroupField groupField = GroupField.fromId(groupId.trim());
// If group field is valid, add it
if (groupField != null) {
query.addGroup(new Group(groupField));
}
}