Class DefaultQuestionDAO
java.lang.Object
com.ubs.backend.classes.database.dao.DAO<DefaultQuestion>
com.ubs.backend.classes.database.dao.questions.DefaultQuestionDAO
DAO for com.ubs.backend.classes.database.dao.questions.DefaultQuestion
- Since:
- 17.07.2021
- Author:
- Sarah Ambi, Tim Irmler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncount(javax.persistence.EntityManager em)selectRandom(int max)selectRandom(int max, javax.persistence.EntityManager em)select random questionsvoidUpdates a defaultQuestion in the Database
-
Constructor Details
-
DefaultQuestionDAO
public DefaultQuestionDAO()
-
-
Method Details
-
selectRandom
select random questions- Parameters:
max- number of default questions you wantem-- Returns:
- the random questions in a arraylist
-
selectRandom
-
count
-
update
Updates a defaultQuestion in the Database- Parameters:
id- the id of the defaultquestionquestion- the new Content of the defaultquestion
-