Search in sources :

Example 16 with MorphiaView

use of io.lumeer.storage.mongodb.model.MorphiaView in project engine by Lumeer.

the class MorphiaViewDao method getViews.

@Override
public List<View> getViews(final SuggestionQuery query) {
    Query<MorphiaView> viewQuery = createViewSuggestionQuery(query);
    FindOptions findOptions = createFindOptions(query);
    return new ArrayList<>(viewQuery.asList(findOptions));
}
Also used : FindOptions(org.mongodb.morphia.query.FindOptions) MorphiaView(io.lumeer.storage.mongodb.model.MorphiaView) ArrayList(java.util.ArrayList)

Example 17 with MorphiaView

use of io.lumeer.storage.mongodb.model.MorphiaView in project engine by Lumeer.

the class MorphiaViewDao method getViews.

public List<View> getViews(SearchQuery query) {
    Query<MorphiaView> viewQuery = createViewSearchQuery(query);
    FindOptions findOptions = createFindOptions(query);
    return new ArrayList<>(viewQuery.asList(findOptions));
}
Also used : FindOptions(org.mongodb.morphia.query.FindOptions) MorphiaView(io.lumeer.storage.mongodb.model.MorphiaView) ArrayList(java.util.ArrayList)

Aggregations

MorphiaView (io.lumeer.storage.mongodb.model.MorphiaView)17 Test (org.junit.Test)11 View (io.lumeer.api.model.View)4 SearchQuery (io.lumeer.storage.api.query.SearchQuery)4 ObjectId (org.bson.types.ObjectId)3 ArrayList (java.util.ArrayList)2 FindOptions (org.mongodb.morphia.query.FindOptions)2 Permission (io.lumeer.api.model.Permission)1 MorphiaPermission (io.lumeer.storage.mongodb.model.embedded.MorphiaPermission)1 MorphiaPermissions (io.lumeer.storage.mongodb.model.embedded.MorphiaPermissions)1