// Fetching
criteria.fetchPermissions(true);
if (id != null) {
// If we're fetching a single Role, then fetch all the related Sets.
criteria.fetchSubjects(true);
criteria.fetchResourceGroups(true);
criteria.fetchLdapGroups(true);
criteria.fetchBundleGroups(true);
}
// TODO: instead of fetching subjects and resource groups, use a composite object that will pull the subject