org.springframework.data.jpa.repository.EntityGraph.EntityGraphType Java Examples
The following examples show how to use
org.springframework.data.jpa.repository.EntityGraph.EntityGraphType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RepositoryRepository.java From mojito with Apache License 2.0 | 5 votes |
@EntityGraph(value = "Repository.statistics", type = EntityGraphType.LOAD) @Override public List<Repository> findAll(Specification<Repository> s, Sort sort);
Example #2
Source File: RepositoryRepository.java From mojito with Apache License 2.0 | 4 votes |
@EntityGraph(value = "Repository.statistics", type = EntityGraphType.LOAD) List<Repository> findByDeletedFalseAndCheckSLATrueAndRepositoryStatisticOoslaTextUnitCountGreaterThanOrderByNameAsc(long statisticsOoslaTextUnitCount);
Example #3
Source File: ItemRepository.java From tutorials with MIT License | 4 votes |
@EntityGraph(value = "Item.characteristics", type = EntityGraphType.FETCH) Item findByName(String name);
Example #4
Source File: HostGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "HostGroup.instanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT h FROM HostGroup h LEFT JOIN FETCH h.recipes WHERE h.cluster.id= :clusterId AND h.name= :hostGroupName") HostGroup findHostGroupInClusterByNameWithRecipes(@Param("clusterId") Long clusterId, @Param("hostGroupName") String hostGroupName);
Example #5
Source File: HostGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "HostGroup.instanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT h FROM HostGroup h JOIN h.recipes r WHERE r.id= :recipeId") Set<HostGroup> findAllHostGroupsByRecipe(@Param("recipeId") Long recipeId);
Example #6
Source File: HostGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "HostGroup.instanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT h FROM HostGroup h WHERE h.cluster.id= :clusterId AND h.name= :hostGroupName") Optional<HostGroup> findHostGroupInClusterByNameWithInstanceMetadas(@Param("clusterId") Long clusterId, @Param("hostGroupName") String hostGroupName);
Example #7
Source File: HostGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "HostGroup.instanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT h FROM HostGroup h WHERE h.cluster.id= :clusterId") Set<HostGroup> findHostGroupsInCluster(@Param("clusterId") Long clusterId);
Example #8
Source File: InstanceGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "InstanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT i from InstanceGroup i WHERE i.stack.id = :stackId AND i.groupName = :groupName") Optional<InstanceGroup> findOneWithInstanceMetadataByGroupNameInStack(@Param("stackId") Long stackId, @Param("groupName") String groupName);
Example #9
Source File: ClusterComponentRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "ClusterComponent.cluster.rdsConfig", type = EntityGraphType.LOAD) Set<ClusterComponent> findByComponentType(ComponentType componentType);
Example #10
Source File: InstanceGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "InstanceGroup.instanceMetaData", type = EntityGraphType.LOAD) Set<InstanceGroup> findByStackId(@Param("stackId") Long stackId);
Example #11
Source File: InstanceGroupRepository.java From cloudbreak with Apache License 2.0 | 4 votes |
@EntityGraph(value = "InstanceGroup.instanceMetaData", type = EntityGraphType.LOAD) @Query("SELECT i from InstanceGroup i WHERE i.stack.id = :stackId AND i.groupName = :groupName") Optional<InstanceGroup> findOneByGroupNameInStack(@Param("stackId") Long stackId, @Param("groupName") String groupName);
Example #12
Source File: StockProductRepository.java From cloudstreetmarket.com with GNU General Public License v3.0 | 4 votes |
@EntityGraph(value = "StockProduct.detail", type = EntityGraphType.LOAD) Page<StockProduct> findByIndices(Index index, Pageable pageable);
Example #13
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieving all actions referring to the first group of a rollout. * * @param pageable * page parameters * @param rollout * the rollout the actions belong to * @param actionStatus * the status the actions have * @return the actions referring a specific rollout and a specific parent * rolloutgroup in a specific status */ @EntityGraph(attributePaths = { "target" }, type = EntityGraphType.LOAD) Page<Action> findByRolloutIdAndRolloutGroupParentIsNullAndStatus(Pageable pageable, Long rollout, Status actionStatus);
Example #14
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieving all actions referring to a given rollout with a specific * action as parent reference and a specific status. * * Finding all actions of a specific rolloutgroup parent relation. * * @param pageable * page parameters * @param rollout * the rollout the actions belong to * @param rolloutGroupParent * the parent rolloutgroup the actions should reference * @param actionStatus * the status the actions have * @return the actions referring a specific rollout and a specific parent * rolloutgroup in a specific status */ @EntityGraph(attributePaths = { "target" }, type = EntityGraphType.LOAD) Page<Action> findByRolloutIdAndRolloutGroupParentIdAndStatus(Pageable pageable, Long rollout, Long rolloutGroupParent, Status actionStatus);
Example #15
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * * Retrieves all {@link Action}s which are active and referring to the given * target Ids and distribution set not requiring migration step. * * @param targetIds * the IDs of targets for the actions * @return the found list of {@link Action}s */ @EntityGraph(attributePaths = { "target" }, type = EntityGraphType.LOAD) @Query("SELECT a FROM JpaAction a WHERE a.active = true AND a.distributionSet.requiredMigrationStep = false AND a.target IN ?1") List<JpaAction> findByActiveAndTargetIdInAndDistributionSetNotRequiredMigrationStep(Collection<Long> targetIds);
Example #16
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * * Retrieves all {@link Action}s which are active and referring to the given * target Ids and distribution set not requiring migration step. * * @param targetIds * the IDs of targets for the actions * @param notStatus * the status which the actions should not have * @return the found list of {@link Action}s */ @EntityGraph(attributePaths = { "target" }, type = EntityGraphType.LOAD) @Query("SELECT a FROM JpaAction a WHERE a.active = true AND a.distributionSet.requiredMigrationStep = false AND a.target IN ?1 AND a.status != ?2") List<JpaAction> findByActiveAndTargetIdInAndActionStatusNotEqualToAndDistributionSetNotRequiredMigrationStep( Collection<Long> targetIds, Action.Status notStatus);
Example #17
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieves all {@link Action}s of a specific target and given active flag * ordered by action ID. Loads also the lazy * {@link Action#getDistributionSet()} field. * * @param pageable * page parameters * @param controllerId * to search for * @param active * {@code true} for all actions which are currently active, * {@code false} for inactive * @return a list of actions */ @EntityGraph(value = "Action.ds", type = EntityGraphType.LOAD) @Query("Select a from JpaAction a where a.target.controllerId = :controllerId and a.active = :active") Page<Action> findByActiveAndTarget(Pageable pageable, @Param("controllerId") String controllerId, @Param("active") boolean active);
Example #18
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieves the active {@link Action}s with the lowest IDs (the oldest one) * whose weight is null and that that refers to the given {@link Target}. * * @param pageable * pageable * @param controllerId * the target to find assigned actions * @return the found {@link Action}s */ @EntityGraph(value = "Action.ds", type = EntityGraphType.LOAD) Page<Action> findByTargetControllerIdAndActiveIsTrueAndWeightIsNullOrderByIdAsc(Pageable pageable, String controllerId);
Example #19
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieves the active {@link Action}s with the highest weights that refer * to the given {@link Target}. If {@link Action}s have the same weight they * are ordered ascending by ID (oldest ones first). * * @param pageable * pageable * @param controllerId * the target to find assigned actions * @return the found {@link Action}s */ @EntityGraph(value = "Action.ds", type = EntityGraphType.LOAD) Page<Action> findByTargetControllerIdAndActiveIsTrueAndWeightIsNotNullOrderByWeightDescIdAsc(Pageable pageable, String controllerId);
Example #20
Source File: ActionRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Retrieves an Action with all lazy attributes. * * @param actionId * the ID of the action * @return the found {@link Action} */ @EntityGraph(value = "Action.all", type = EntityGraphType.LOAD) Optional<Action> getById(Long actionId);
Example #21
Source File: ActionStatusRepository.java From hawkbit with Eclipse Public License 1.0 | 2 votes |
/** * Finds all status updates for the defined action and target including * {@link ActionStatus#getMessages()}. * * @param pageReq * for page configuration * @param target * to look for * @param actionId * to look for * @return Page with found targets */ @EntityGraph(value = "ActionStatus.withMessages", type = EntityGraphType.LOAD) Page<ActionStatus> getByActionId(Pageable pageReq, Long actionId);