Package daos.common
Class ComponentDao
- java.lang.Object
-
- daos.common.AbstractDao
-
- daos.common.ComponentDao
-
@Singleton public class ComponentDao extends AbstractDao
DAO for Component entity
-
-
Field Summary
-
Fields inherited from class daos.common.AbstractDao
jpa
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeActive(Component component, boolean active)Change and persist active property of a Component.voidcreate(Component component)ComponentfindById(java.lang.Long id)java.util.List<Component>findByTitle(java.lang.String title)Finds all components with the given title and returns them in a list.java.util.Optional<Component>findByUuid(java.lang.String uuid)Finds the component with this UUIDjava.util.Optional<Component>findByUuid(java.lang.String uuid, Study study)Searches for components with this UUID within the given study.voidremove(Component component)voidupdate(Component component)
-
-
-
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.
-
-