Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
68af9d45
Commit
68af9d45
authored
10 years ago
by
Christoph Thelen
Browse files
Options
Downloads
Patches
Plain Diff
Use generic _all_docs view instead of rolling our own
parent
dc9630c0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+4
-4
4 additions, 4 deletions
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
with
4 additions
and
4 deletions
src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+
4
−
4
View file @
68af9d45
...
...
@@ -2104,9 +2104,9 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
@Override
public
List
<
Question
>
getQuestionsByIds
(
List
<
String
>
ids
)
{
String
viewName
=
"skill_question/questions_by_ids"
;
NovaView
view
=
new
NovaView
(
viewName
);
NovaView
view
=
new
NovaView
(
"_all_docs"
);
view
.
setKeys
(
ids
);
view
.
setIncludeDocs
(
true
);
final
List
<
Document
>
questiondocs
=
getDatabase
().
view
(
view
).
getResults
();
if
(
questiondocs
==
null
||
questiondocs
.
isEmpty
())
{
return
null
;
...
...
@@ -2118,12 +2118,12 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
morpherRegistry
.
registerMorpher
(
dynaMorpher
);
for
(
final
Document
document
:
questiondocs
)
{
final
Question
question
=
(
Question
)
JSONObject
.
toBean
(
document
.
getJSONObject
().
getJSONObject
(
"
value
"
),
document
.
getJSONObject
().
getJSONObject
(
"
doc
"
),
Question
.
class
);
@SuppressWarnings
(
"unchecked"
)
final
Collection
<
PossibleAnswer
>
answers
=
JSONArray
.
toCollection
(
document
.
getJSONObject
().
getJSONObject
(
"
value
"
).
getJSONArray
(
"possibleAnswers"
),
document
.
getJSONObject
().
getJSONObject
(
"
doc
"
).
getJSONArray
(
"possibleAnswers"
),
PossibleAnswer
.
class
);
Session
session
=
getSessionFromId
(
question
.
getSessionId
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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