Last change
on this file was 53765dd, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago |
Fix bugs.
|
-
Property mode
set to
100755
|
File size:
693 bytes
|
Rev | Line | |
---|
[a436340] | 1 | package edu.gjoko.schedlr.repositories;
|
---|
| 2 |
|
---|
[53765dd] | 3 | import edu.gjoko.schedlr.entity.Service;
|
---|
[a436340] | 4 | import edu.gjoko.schedlr.entity.ServiceType;
|
---|
| 5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
[1413ee2] | 6 | import org.springframework.data.jpa.repository.Query;
|
---|
[a436340] | 7 | import org.springframework.stereotype.Repository;
|
---|
| 8 |
|
---|
[53765dd] | 9 | import java.util.List;
|
---|
| 10 |
|
---|
[a436340] | 11 | @Repository
|
---|
| 12 | public interface ServiceTypeRepository extends JpaRepository<ServiceType, Long> {
|
---|
[53765dd] | 13 |
|
---|
| 14 | List<ServiceType> findAllByBusinessType_Id(Long businessTypeId);
|
---|
| 15 |
|
---|
| 16 | @Query(value = "select b.businessType.serviceTypes from Business as b " +
|
---|
| 17 | " where b.owner.id = :ownerId")
|
---|
| 18 | List<ServiceType> findAppropriateBusinessTypesForBusinessByOwnerId(Long ownerId);
|
---|
[a436340] | 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.