Skip to content
Snippets Groups Projects
Commit 0a1954b5 authored by vkovtun's avatar vkovtun
Browse files

BIS-999: Fixing not fetched exception when exporting with levels below.

parent b44a8ad1
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -213,23 +213,28 @@ class EntitiesFinder ...@@ -213,23 +213,28 @@ class EntitiesFinder
final List<SamplePermId> samplePermIds = permIds.stream().map(SamplePermId::new) final List<SamplePermId> samplePermIds = permIds.stream().map(SamplePermId::new)
.collect(Collectors.toList()); .collect(Collectors.toList());
final SampleFetchOptions fetchOptions = new SampleFetchOptions(); final SampleFetchOptions fetchOptions = new SampleFetchOptions();
configureFetchOptions(fetchOptions);
configureFetchOptions(fetchOptions.withParents());
configureFetchOptions(fetchOptions.withChildren());
final DataSetFetchOptions dataSetFetchOptions = fetchOptions.withDataSets();
configureFetchOptions(dataSetFetchOptions);
return api.getSamples(sessionToken, samplePermIds, fetchOptions).values();
}
private static void configureFetchOptions(final SampleFetchOptions fetchOptions)
{
final ExperimentFetchOptions experimentFetchOptions = fetchOptions.withExperiment(); final ExperimentFetchOptions experimentFetchOptions = fetchOptions.withExperiment();
experimentFetchOptions.withProperties(); experimentFetchOptions.withProperties();
experimentFetchOptions.withProject().withSpace(); experimentFetchOptions.withProject().withSpace();
fetchOptions.withSpace(); fetchOptions.withSpace();
fetchOptions.withProject().withSpace(); fetchOptions.withProject().withSpace();
fetchOptions.withParents().withProperties();
fetchOptions.withChildren().withProperties();
fetchOptions.withType().withPropertyAssignments().withPropertyType(); fetchOptions.withType().withPropertyAssignments().withPropertyType();
fetchOptions.withProperties(); fetchOptions.withProperties();
fetchOptions.withRegistrator(); fetchOptions.withRegistrator();
fetchOptions.withModifier(); fetchOptions.withModifier();
fetchOptions.withContainer(); fetchOptions.withContainer();
final DataSetFetchOptions dataSetFetchOptions = fetchOptions.withDataSets();
configureFetchOptions(dataSetFetchOptions);
return api.getSamples(sessionToken, samplePermIds, fetchOptions).values();
} }
private static void configureFetchOptions(final DataSetFetchOptions dataSetFetchOptions) private static void configureFetchOptions(final DataSetFetchOptions dataSetFetchOptions)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment