Package daos.common

Class StudyDao


  • @Singleton
    public class StudyDao
    extends AbstractDao
    DAO of Study entity
    • 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()
      • findAllByUser

        public java.util.List<Study> findAllByUser​(User user)
      • 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)