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
78678d10
Commit
78678d10
authored
14 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
SE-229 log database requests
SVN: 15326
parent
66b3d4b3
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/ProteinInfoTable.java
+26
-10
26 additions, 10 deletions
.../plugin/phosphonetx/server/business/ProteinInfoTable.java
with
26 additions
and
10 deletions
rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/ProteinInfoTable.java
+
26
−
10
View file @
78678d10
...
...
@@ -28,6 +28,10 @@ import java.util.Map;
import
net.lemnik.eodsql.DataSet
;
import
org.apache.log4j.Logger
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.TechId
;
...
...
@@ -48,6 +52,9 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.dto.ProteinWithAbundan
*/
class
ProteinInfoTable
extends
AbstractBusinessObject
implements
IProteinInfoTable
{
protected
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
ProteinInfoTable
.
class
);
private
List
<
ProteinInfo
>
infos
;
private
final
ISampleProvider
sampleProvider
;
...
...
@@ -125,6 +132,7 @@ class ProteinInfoTable extends AbstractBusinessObject implements IProteinInfoTab
AbundanceManager
abundanceManager
=
new
AbundanceManager
(
sampleProvider
);
IPhosphoNetXDAOFactory
specificDAOFactory
=
getSpecificDAOFactory
();
IProteinQueryDAO
dao
=
specificDAOFactory
.
getProteinQueryDAO
();
long
time
=
System
.
currentTimeMillis
();
DataSet
<
ProteinReferenceWithProtein
>
dataSet
=
dao
.
listProteinReferencesByExperiment
(
experimentPermID
);
List
<
ProteinReferenceWithProtein
>
proteins
=
new
ArrayList
<
ProteinReferenceWithProtein
>();
...
...
@@ -140,6 +148,7 @@ class ProteinInfoTable extends AbstractBusinessObject implements IProteinInfoTab
{
dataSet
.
close
();
}
operationLog
.
info
(
"("
+
(
System
.
currentTimeMillis
()
-
time
)
+
"ms) for listProteinReferencesByExperiment"
);
Map
<
Long
,
List
<
ProteinAbundance
>>
abundancesPerProtein
=
getAbudancesPerProtein
(
proteinIDs
);
ErrorModel
errorModel
=
new
ErrorModel
(
specificDAOFactory
);
for
(
ProteinReferenceWithProtein
protein
:
proteins
)
...
...
@@ -156,26 +165,33 @@ class ProteinInfoTable extends AbstractBusinessObject implements IProteinInfoTab
private
Map
<
Long
,
List
<
ProteinAbundance
>>
getAbudancesPerProtein
(
LongOpenHashSet
proteinIDs
)
{
IProteinQueryDAO
dao
=
getSpecificDAOFactory
().
getProteinQueryDAO
();
long
time
=
System
.
currentTimeMillis
();
DataSet
<
ProteinAbundance
>
dataSet
=
dao
.
listProteinWithAbundanceByExperiment
(
proteinIDs
);
Map
<
Long
,
List
<
ProteinAbundance
>>
abundancesPerProtein
=
new
HashMap
<
Long
,
List
<
ProteinAbundance
>>();
List
<
ProteinAbundance
>
proteinAbundances
=
new
ArrayList
<
ProteinAbundance
>();
try
{
for
(
ProteinAbundance
proteinAbundance
:
dataSet
)
{
long
proteinID
=
proteinAbundance
.
getId
();
List
<
ProteinAbundance
>
list
=
abundancesPerProtein
.
get
(
proteinID
);
if
(
list
==
null
)
{
list
=
new
ArrayList
<
ProteinAbundance
>();
abundancesPerProtein
.
put
(
proteinID
,
list
);
}
list
.
add
(
proteinAbundance
);
proteinAbundances
.
add
(
proteinAbundance
);
}
}
finally
{
dataSet
.
close
();
}
operationLog
.
info
(
"("
+
(
System
.
currentTimeMillis
()
-
time
)
+
"ms) for listProteinWithAbundanceByExperiment"
);
Map
<
Long
,
List
<
ProteinAbundance
>>
abundancesPerProtein
=
new
HashMap
<
Long
,
List
<
ProteinAbundance
>>();
for
(
ProteinAbundance
proteinAbundance
:
proteinAbundances
)
{
long
proteinID
=
proteinAbundance
.
getId
();
List
<
ProteinAbundance
>
list
=
abundancesPerProtein
.
get
(
proteinID
);
if
(
list
==
null
)
{
list
=
new
ArrayList
<
ProteinAbundance
>();
abundancesPerProtein
.
put
(
proteinID
,
list
);
}
list
.
add
(
proteinAbundance
);
}
return
abundancesPerProtein
;
}
...
...
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