Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
e4259972
Commit
e4259972
authored
14 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
improve performance of gathering parent samples
SVN: 18166
parent
faeb84e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleProvider.java
+13
-5
13 additions, 5 deletions
...is/plugin/phosphonetx/server/business/SampleProvider.java
with
13 additions
and
5 deletions
rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleProvider.java
+
13
−
5
View file @
e4259972
...
@@ -17,8 +17,10 @@
...
@@ -17,8 +17,10 @@
package
ch.systemsx.cisd.openbis.plugin.phosphonetx.server.business
;
package
ch.systemsx.cisd.openbis.plugin.phosphonetx.server.business
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.samplelister.ISampleLister
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.samplelister.ISampleLister
;
...
@@ -59,15 +61,21 @@ class SampleProvider implements ISampleProvider
...
@@ -59,15 +61,21 @@ class SampleProvider implements ISampleProvider
ListOrSearchSampleCriteria
criteria
)
ListOrSearchSampleCriteria
criteria
)
{
{
List
<
Sample
>
list
=
lister
.
list
(
criteria
);
List
<
Sample
>
list
=
lister
.
list
(
criteria
);
Set
<
Long
>
sampleIDs
=
new
HashSet
<
Long
>();
for
(
Sample
sample
:
list
)
for
(
Sample
sample
:
list
)
{
{
samplesByPermIDs
.
put
(
sample
.
getPermId
(),
sample
);
samplesByPermIDs
.
put
(
sample
.
getPermId
(),
sample
);
ListSampleCriteria
criteria2
=
sampleIDs
.
add
(
sample
.
getId
());
ListSampleCriteria
.
createForChild
(
new
TechId
(
sample
.
getId
()));
ListOrSearchSampleCriteria
criteria3
=
new
ListOrSearchSampleCriteria
(
criteria2
);
criteria3
.
setEnrichDependentSamplesWithProperties
(
true
);
gatherSamplesAndAncestorsRecursively
(
lister
,
criteria3
);
}
}
if
(
sampleIDs
.
isEmpty
())
{
return
;
}
ListSampleCriteria
criteria2
=
ListSampleCriteria
.
createForChildren
(
sampleIDs
);
ListOrSearchSampleCriteria
criteria3
=
new
ListOrSearchSampleCriteria
(
criteria2
);
criteria3
.
setEnrichDependentSamplesWithProperties
(
true
);
gatherSamplesAndAncestorsRecursively
(
lister
,
criteria3
);
}
}
public
Sample
getSample
(
String
permID
)
public
Sample
getSample
(
String
permID
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment