Revision 56472
Added by Michele Artini almost 5 years ago
OrganizationSimpleViewRepository.java | ||
---|---|---|
13 | 13 |
@Repository |
14 | 14 |
public interface OrganizationSimpleViewRepository extends ReadOnlyRepository<OrganizationSimpleView, String> { |
15 | 15 |
|
16 |
Page<OrganizationSimpleView> findByCountry(String country, Pageable page);
|
|
16 |
Page<OrganizationSimpleView> findByNameContainingIgnoreCase(String name, Pageable pageable);
|
|
17 | 17 |
|
18 |
Page<OrganizationSimpleView> findByCountry(String country, Pageable pageable); |
|
19 |
|
|
20 |
@Query(value = "select * from organizations_simple_view where ?1 = any(types)", countQuery = "select count(*) from types where type = ?1", nativeQuery = true) |
|
21 |
Page<OrganizationSimpleView> findByType(String type, Pageable pageable); |
|
22 |
|
|
18 | 23 |
@Query(value = "select country as value, count(*) as count from organizations group by country order by count desc", nativeQuery = true) |
19 | 24 |
List<BrowseEntry> browseCountries(); |
20 | 25 |
|
26 |
@Query(value = "select type as value, count(*) as count from types group by type order by count desc", nativeQuery = true) |
|
27 |
List<BrowseEntry> browseTypes(); |
|
28 |
|
|
21 | 29 |
} |
Also available in: Unified diff