.getGroupDao().select());
List<FolderPermissionVO> result = new ArrayList<FolderPermissionVO>();
for (FolderPermissionEntity perm : inherited) {
if (!containsPermission(direct, perm)
&& !containsPermissionVO(result, perm)) {
FolderPermissionVO vo = new FolderPermissionVO(perm);
vo.setInherited(true);
vo.setGroup(groups.get(perm.getGroupId()));
result.add(vo);
}
}
for (FolderPermissionEntity perm : direct) {
FolderPermissionVO vo = new FolderPermissionVO(perm);
vo.setInherited(false);
vo.setGroup(groups.get(perm.getGroupId()));
result.add(vo);
}
return result;
}