Package daos.common

Class ComponentDao


  • @Singleton
    public class ComponentDao
    extends AbstractDao
    DAO for Component entity
    • Method Detail

      • create

        public void create​(Component component)
      • update

        public void update​(Component component)
      • changeActive

        public void changeActive​(Component component,
                                 boolean active)
        Change and persist active property of a Component.
      • remove

        public void remove​(Component component)
      • findById

        public Component findById​(java.lang.Long id)
      • findByUuid

        public java.util.Optional<Component> findByUuid​(java.lang.String uuid)
        Finds the component with this UUID
      • findByUuid

        public java.util.Optional<Component> findByUuid​(java.lang.String uuid,
                                                        Study study)
        Searches for components with this UUID within the given study. This is faster than just searching by UUID since Component does not have an index on its UUID field.
      • findByTitle

        public java.util.List<Component> findByTitle​(java.lang.String title)
        Finds all components with the given title and returns them in a list. If there is none it returns an empty list.