org.springframework.data.jpa.repository.EntityGraph Java Examples
The following examples show how to use
org.springframework.data.jpa.repository.EntityGraph.
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: UserRepository.java From java-microservices-examples with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) Optional<User> findOneWithAuthoritiesByEmail(String email);
Example #3
Source File: UserRepository.java From SMSC with Apache License 2.0 | 5 votes |
@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 #4
Source File: UserRepository.java From java-microservices-examples with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) Optional<User> findOneWithAuthoritiesByEmail(String email);
Example #5
Source File: UserRepository.java From cubeai with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login);
Example #6
Source File: UserRepository.java From java-microservices-examples with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesById(Long id);
Example #7
Source File: GroupRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"authorities"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('GROUP_READ')") Iterable<Group> findAll();
Example #8
Source File: UserRepository.java From java-microservices-examples with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesById(Long id);
Example #9
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") Iterable<DashboardBox> findAll(Predicate predicate, OrderSpecifier<?>[] orders);
Example #10
Source File: UserRepository.java From alchemy with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login);
Example #11
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") Iterable<DashboardBox> findAll(Predicate predicate);
Example #12
Source File: DashboardRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxes"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')") Iterable<Dashboard> findAll(Sort sort);
Example #13
Source File: DashboardBoxTypeRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"kind", "type"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_TYPE_READ')") Iterable<DashboardBoxType> findAll(Sort sort);
Example #14
Source File: UserRepository.java From SMSC with Apache License 2.0 | 5 votes |
@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 #15
Source File: UserRepository.java From SMSC with Apache License 2.0 | 5 votes |
@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 File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") Iterable<DashboardBox> findAll(Sort sort);
Example #17
Source File: UserRepository.java From okta-jhipster-microservices-oauth-example with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login);
Example #18
Source File: DashboardRepository.java From SMSC with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = {"dashboardBoxes"}) @PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')") Dashboard findByName(@Param("name") String name);
Example #19
Source File: DashboardRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxes"}) @PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_READ')") Dashboard findOne(Predicate predicate);
Example #20
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@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 File: UserRepository.java From TeamDojo with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) Optional<User> findOneWithAuthoritiesByEmail(String email);
Example #22
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@Override @EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PostAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") DashboardBox findOne(Predicate predicate);
Example #23
Source File: UserRepository.java From Spring-5.0-Projects with MIT License | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login);
Example #24
Source File: UserRepository.java From Spring-5.0-Projects with MIT License | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) Optional<User> findOneWithAuthoritiesByEmail(String email);
Example #25
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") List<DashboardBox> findAllByDashboard(@RequestBody Dashboard dashboard);
Example #26
Source File: UserRepository.java From e-commerce-microservice with Apache License 2.0 | 5 votes |
@EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login);
Example #27
Source File: AgentRepository.java From DrivingAgency with MIT License | 5 votes |
@Transactional(isolation = Isolation.REPEATABLE_READ) @EntityGraph(value = "agent.all") List<Agent> findAll();
Example #28
Source File: UserRepository.java From SMSC with Apache License 2.0 | 4 votes |
@Override @EntityGraph(attributePaths = {"customer"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or (hasRole('ADMIN_USER') and hasAuthority('CUSTOMER_USER_READ'))") Iterable<User> findAll(Predicate predicate);
Example #29
Source File: UserRepository.java From SMSC with Apache License 2.0 | 4 votes |
@Override @EntityGraph(attributePaths = {"customer"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or (hasRole('ADMIN_USER') and hasAuthority('CUSTOMER_USER_READ'))") Page<User> findAll(Predicate predicate, Pageable pageable);
Example #30
Source File: DashboardBoxRepository.java From SMSC with Apache License 2.0 | 4 votes |
@EntityGraph(attributePaths = {"dashboardBoxType", "width", "height"}) @PreAuthorize("hasRole('POWER_ADMIN_USER') or hasAuthority('DASHBOARD_BOX_READ')") List<DashboardBox> findAllByName(@Param("name") String name);