diff --git a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/ActionRepository.java b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/ActionRepository.java index a93fbdca7..8221fa0ca 100644 --- a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/ActionRepository.java +++ b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/ActionRepository.java @@ -37,16 +37,6 @@ import org.springframework.transaction.annotation.Transactional; */ @Transactional(readOnly = true) public interface ActionRepository extends BaseEntityRepository, JpaSpecificationExecutor { - - /* - * (non-Javadoc) - * - * @see org.springframework.data.repository.CrudRepository#findAll() - */ - @Override - @EntityGraph(value = "Action.all", type = EntityGraphType.LOAD) - Iterable findAll(); - /** * Retrieves an Action with all lazy attributes. * @@ -67,7 +57,6 @@ public interface ActionRepository extends BaseEntityRepository, Jp * the {@link DistributionSet} on which will be filtered * @return the found {@link Action}s */ - @EntityGraph(value = "Action.all", type = EntityGraphType.LOAD) Page findByDistributionSet(final Pageable pageable, final DistributionSet ds); /** @@ -84,7 +73,8 @@ public interface ActionRepository extends BaseEntityRepository, Jp /** * Retrieves all {@link Action}s which are active and referring the given - * {@link Target} in a specified order. + * {@link Target} in a specified order. Loads also the lazy + * {@link Action#getDistributionSet()} field. * * @param pageable * page parameters @@ -125,7 +115,6 @@ public interface ActionRepository extends BaseEntityRepository, Jp * @return the found {@link UpdateAction}s */ @Query("Select a from Action a where a.target = :target and a.distributionSet = :ds order by a.id") - @EntityGraph(value = "Action.all", type = EntityGraphType.LOAD) Page findByTargetAndDistributionSet(final Pageable pageable, @Param("target") final Target target, @Param("ds") DistributionSet ds); @@ -159,7 +148,8 @@ public interface ActionRepository extends BaseEntityRepository, Jp /** * Retrieves all {@link Action}s of a specific target and given active flag - * ordered by action ID. + * ordered by action ID. Loads also the lazy + * {@link Action#getDistributionSet()} field. * * @param target * to search for diff --git a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/Action.java b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/Action.java index 1f8a71d76..c19b947de 100644 --- a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/Action.java +++ b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/Action.java @@ -35,21 +35,15 @@ import org.eclipse.persistence.annotations.CascadeOnDelete; /** *

- * Applicable transition changes of the software {@link SoftwareModule} state of - * a {@link Target}, e.g. install, uninstall, update, start, stop, and - * preparations for the transition change, i.e. download. + * Applicable transition changes of the {@link SoftwareModule}s state of a + * {@link Target}, e.g. install, uninstall, update and preparations for the + * transition change, i.e. download. *

* *

- * Actions are managed by the SP server (SPS) and applied to the edge controller - * by the SP controller (SPC). Actions may also be value added commands that are - * nor directly related to SP, e.g. factory reset. + * Actions are managed by the SP server and applied to the targets by the + * client. *

- * - * - * - * - * */ @Table(name = "sp_action", indexes = { @Index(name = "sp_idx_action_01", columnList = "tenant,distribution_set"), @Index(name = "sp_idx_action_02", columnList = "tenant,target,active"),