Last change
on this file since 943857c was 53765dd, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago |
Fix bugs.
|
-
Property mode
set to
100755
|
File size:
693 bytes
|
Line | |
---|
1 | package edu.gjoko.schedlr.repositories;
|
---|
2 |
|
---|
3 | import edu.gjoko.schedlr.entity.Service;
|
---|
4 | import edu.gjoko.schedlr.entity.ServiceType;
|
---|
5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
6 | import org.springframework.data.jpa.repository.Query;
|
---|
7 | import org.springframework.stereotype.Repository;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Repository
|
---|
12 | public interface ServiceTypeRepository extends JpaRepository<ServiceType, Long> {
|
---|
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);
|
---|
19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.