Java Code Examples for org.springframework.data.jpa.repository.EntityGraph

The following examples show how to use org.springframework.data.jpa.repository.EntityGraph. These examples are extracted from open source projects. 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 Project: DrivingAgency   Source File: AgentRepository.java    License: MIT License 5 votes vote down vote up
@Transactional(isolation = Isolation.REPEATABLE_READ)
@EntityGraph(value = "agent.all")
List<Agent> findAll();
 
Example 2
Source Project: SMSC   Source File: DashboardBoxTypeRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"kind", "type"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_TYPE_READ')")
Iterable<DashboardBoxType> findAll(Sort sort);
 
Example 3
Source Project: SMSC   Source File: DashboardRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxes"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')")
Iterable<Dashboard> findAll(Sort sort);
 
Example 4
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
Iterable<DashboardBox> findAll(Predicate predicate);
 
Example 5
Source Project: alchemy   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
 
Example 6
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
Iterable<DashboardBox> findAll(Predicate predicate, OrderSpecifier<?>[] orders);
 
Example 7
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesById(Long id);
 
Example 8
Source Project: SMSC   Source File: GroupRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"authorities"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('GROUP_READ')")
Iterable<Group> findAll();
 
Example 9
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
 
Example 10
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesById(Long id);
 
Example 11
Source Project: SMSC   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboards", "roles", "authorities", "groups", "salutation"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or (hasRole('ADMIN_USER') and hasAuthority('ADMIN_USER_READ'))")
Page<User> findAll(Pageable pageable);
 
Example 12
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
 
Example 13
Source Project: SMSC   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboards", "roles", "authorities", "groups", "salutation"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or (hasRole('ADMIN_USER') and hasAuthority('ADMIN_USER_READ'))")
Iterable<User> findAll(Predicate predicate, Sort sort);
 
Example 14
Source Project: cubeai   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
 
Example 15
Source Project: SMSC   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@PreAuthorize("isAuthenticated()")
@EntityGraph(attributePaths = {"dashboards", "roles", "authorities", "groups", "salutation"})
@Query("select u from AdminUser u where u.id = ?#{ principal?.id }")
User me();
 
Example 16
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
Iterable<DashboardBox> findAll(Sort sort);
 
Example 17
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
 
Example 18
Source Project: SMSC   Source File: DashboardRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = {"dashboardBoxes"})
@PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')")
Dashboard findByName(@Param("name") String name);
 
Example 19
Source Project: SMSC   Source File: DashboardRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxes"})
@PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')")
Dashboard findOne(Predicate predicate);
 
Example 20
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
Iterable<DashboardBox> findAll(Predicate predicate, Sort sort);
 
Example 21
Source Project: TeamDojo   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
 
Example 22
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
DashboardBox findOne(Predicate predicate);
 
Example 23
Source Project: Spring-5.0-Projects   Source File: UserRepository.java    License: MIT License 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
 
Example 24
Source Project: Spring-5.0-Projects   Source File: UserRepository.java    License: MIT License 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_EMAIL_CACHE)
Optional<User> findOneWithAuthoritiesByEmail(String email);
 
Example 25
Source Project: SMSC   Source File: DashboardBoxRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"})
@PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')")
List<DashboardBox> findAllByDashboard(@RequestBody Dashboard dashboard);
 
Example 26
Source Project: e-commerce-microservice   Source File: UserRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(attributePaths = "authorities")
@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
Optional<User> findOneWithAuthoritiesByLogin(String login);
 
Example 27
Source Project: mojito   Source File: RepositoryRepository.java    License: Apache License 2.0 5 votes vote down vote up
@EntityGraph(value = "Repository.statistics", type = EntityGraphType.LOAD)
@Override
public List<Repository> findAll(Specification<Repository> s, Sort sort);
 
Example 28
Source Project: hellokoding-courses   Source File: BookRepository.java    License: MIT License 4 votes vote down vote up
@EntityGraph(attributePaths = "bookCategory")
List<Book> findFirst10ByOrderByNameAsc();
 
Example 29
Source Project: SMSC   Source File: UserRepository.java    License: Apache License 2.0 4 votes vote down vote up
@EntityGraph(attributePaths = {"dashboards", "roles", "authorities", "groups", "salutation"})
@RestResource(exported = false)
User findByEmail(@Param("email") String email);
 
Example 30
@EntityGraph(attributePaths = "authorities")
Optional<User> findOneWithAuthoritiesById(Long id);