main
Last change
on this file since 2a5d6a3 was 2a5d6a3, checked in by Petar Partaloski <ppartaloski@…>, 2 years ago |
Controller, Repository and Service layer improvements, Entity updating
|
-
Property mode
set to
100644
|
File size:
791 bytes
|
Line | |
---|
1 | package com.wediscussmovies.project.repository;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.model.Person;
|
---|
4 | import com.wediscussmovies.project.model.PersonType;
|
---|
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 | import java.util.Optional;
|
---|
11 |
|
---|
12 | @Repository
|
---|
13 | public interface PersonRepository extends JpaRepository<Person, Integer> {
|
---|
14 | public List<Person> findAllByPersonType(PersonType type);
|
---|
15 | public List<Person> findAllByPersonTypeAndNameLike(PersonType type, String name);
|
---|
16 | public List<Person> findAllByPersonTypeAndSurnameLike(PersonType type, String surname);
|
---|
17 | public Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type);
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.