Package daos.common
Class StudyDao
- java.lang.Object
-
- daos.common.AbstractDao
-
- daos.common.StudyDao
-
@Singleton public class StudyDao extends AbstractDao
DAO of Study entity
-
-
Field Summary
-
Fields inherited from class daos.common.AbstractDao
jpa
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcount()Returns the number of Study rowsintcountTotal()Returns the total number of Studys (including the deleted ones)voidcreate(Study study)java.util.List<Study>findAll()java.util.List<Study>findAllByUser(User user)java.util.List<java.lang.Long>findAllMembersByStudyId(java.lang.Long studyId)Returns a list of user IDs of all users that are members of the study with the given ID.StudyfindById(java.lang.Long id)java.util.List<Study>findByStudyResultIds(java.util.Collection<java.lang.Long> srids)java.util.List<Study>findByTitle(java.lang.String title)Finds all studies with the given title and returns them in a list.java.util.Optional<Study>findByUuid(java.lang.String uuid)java.util.List<java.lang.Long>findIdsByStudyResultIds(java.util.Collection<java.lang.Long> srids)voidremove(Study study)voidupdate(Study study)
-
-
-
Method Detail
-
create
public void create(Study study)
-
remove
public void remove(Study study)
-
update
public void update(Study study)
-
findById
public Study findById(java.lang.Long id)
-
findByUuid
public java.util.Optional<Study> findByUuid(java.lang.String uuid)
-
findByTitle
public java.util.List<Study> findByTitle(java.lang.String title)
Finds all studies with the given title and returns them in a list. If there is none it returns an empty list.
-
findByStudyResultIds
public java.util.List<Study> findByStudyResultIds(java.util.Collection<java.lang.Long> srids)
-
findIdsByStudyResultIds
public java.util.List<java.lang.Long> findIdsByStudyResultIds(java.util.Collection<java.lang.Long> srids)
-
findAll
public java.util.List<Study> findAll()
-
findAllMembersByStudyId
public java.util.List<java.lang.Long> findAllMembersByStudyId(java.lang.Long studyId)
Returns a list of user IDs of all users that are members of the study with the given ID.
-
count
public int count()
Returns the number of Study rows
-
countTotal
public int countTotal()
Returns the total number of Studys (including the deleted ones)
-
-