public static List<RolePermission> findByRoleAndApplication(Role role, String application) throws ObjectNotFoundException {
DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
SQLQuery sql = SQL.getSQL(RolePermission.class, "findByRoleAndApplication");
sql.setParameter("role", role.getId());
sql.setParameter("application", application);
return instance.queryForList(RolePermission.class, sql);
}
}