import org.simantics.db.layer0.adapter.GenericRelationIndex;
import org.simantics.db.layer0.adapter.Instances;
import org.simantics.db.layer0.adapter.impl.DefaultPasteImportAdvisor;
+import org.simantics.db.layer0.adapter.impl.EntityInstances.QueryIndex;
import org.simantics.db.layer0.adapter.impl.ImportAdvisorFactory;
import org.simantics.db.layer0.genericrelation.IndexedRelations;
import org.simantics.db.layer0.migration.MigrationUtils;
}
public static List<Resource> searchByTypeShallow(ReadGraph graph, Resource model, Resource type) throws DatabaseException {
- return filterByIndexRoot(graph, model, searchByType(graph, model, type));
+ return graph.syncRequest(new QueryIndex(model, type, ""), TransientCacheListener.<List<Resource>>instance());
}
public static List<Resource> searchByType(ReadGraph graph, Resource model, Resource type) throws DatabaseException {
}
public static List<Resource> searchByQueryShallow(ReadGraph graph, Resource model, String query) throws DatabaseException {
- return filterByIndexRoot(graph, model, searchByQuery(graph, model, query));
+ return graph.syncRequest(new QueryIndex(model, Layer0.getInstance(graph).Entity, query), TransientCacheListener.<List<Resource>>instance());
}
public static List<Resource> searchByQuery(ReadGraph graph, Resource model, String query) throws DatabaseException {
}
public static List<Resource> searchByTypeAndNameShallow(ReadGraph graph, Resource model, Resource type, String name) throws DatabaseException {
- return filterByIndexRoot(graph, model, searchByTypeAndName(graph, model, type, name));
+ return graph.syncRequest(new QueryIndex(model, type, name), TransientCacheListener.<List<Resource>>instance());
}
/**