return invContext.getMongoStore().loadEntities(MongoRoleEntity.class, query, invContext);
}
// Get everything including both application and realm scopes
public static List<MongoRoleEntity> getAllScopesOfClient(ClientModel client, MongoStoreInvocationContext invContext) {
ClientEntity scopedEntity = ((ClientAdapter)client).getMongoEntityAsClient();
List<String> scopeIds = scopedEntity.getScopeIds();
if (scopeIds == null || scopeIds.isEmpty()) {
return Collections.EMPTY_LIST;
}