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
08a3d595
Commit
08a3d595
authored
7 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-5553 : Reverting to the old unused count version
SVN: 38704
parent
e56108f5
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
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java
+1
-7
1 addition, 7 deletions
...nbis/generic/server/api/v1/GeneralInformationService.java
with
1 addition
and
7 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java
+
1
−
7
View file @
08a3d595
...
...
@@ -1391,14 +1391,8 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
querySampleTypeId
.
setParameter
(
"sampleTypeCode"
,
sampleTypeCode
);
int
sampleTypeId
=
((
Number
)
querySampleTypeId
.
uniqueResult
()).
intValue
();
SQLQuery
querySampleTypePrefix
=
currentSession
.
createSQLQuery
(
"SELECT generated_code_prefix from sample_types WHERE code = :sampleTypeCode"
);
querySampleTypePrefix
.
setParameter
(
"sampleTypeCode"
,
sampleTypeCode
);
String
sampleTypePrefix
=
((
String
)
querySampleTypePrefix
.
uniqueResult
());
SQLQuery
querySampleCount
=
currentSession
.
createSQLQuery
(
"SELECT COUNT(*) FROM samples_all WHERE saty_id = :sampleTypeId AND code ~ :codePattern"
);
SQLQuery
querySampleCount
=
currentSession
.
createSQLQuery
(
"SELECT COUNT(*) FROM samples_all WHERE saty_id = :sampleTypeId"
);
querySampleCount
.
setParameter
(
"sampleTypeId"
,
sampleTypeId
);
querySampleCount
.
setParameter
(
"codePattern"
,
"^"
+
sampleTypePrefix
+
"[0-9]+$"
);
long
sampleCount
=
((
Number
)
querySampleCount
.
uniqueResult
()).
longValue
();
return
sampleCount
;
...
...
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