main
Last change
on this file since 7a0bf79 was 7a0bf79, checked in by Petar Partaloski <ppartaloski@…>, 2 years ago |
Early implementations, MovieController CRUD implementation included
|
-
Property mode
set to
100644
|
File size:
613 bytes
|
Rev | Line | |
---|
[6e7b472] | 1 | package com.wediscussmovies.project.repository;
|
---|
| 2 |
|
---|
| 3 | import com.wediscussmovies.project.model.Person;
|
---|
[7a0bf79] | 4 | import com.wediscussmovies.project.model.PersonType;
|
---|
[6e7b472] | 5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
[7a0bf79] | 6 | import org.springframework.data.jpa.repository.Query;
|
---|
[6e7b472] | 7 | import org.springframework.stereotype.Repository;
|
---|
| 8 |
|
---|
[7a0bf79] | 9 | import java.util.List;
|
---|
| 10 | import java.util.Optional;
|
---|
| 11 |
|
---|
[6e7b472] | 12 | @Repository
|
---|
| 13 | public interface PersonRepository extends JpaRepository<Person, Integer> {
|
---|
[7a0bf79] | 14 | public List<Person> findAllByPersonType(PersonType type);
|
---|
| 15 | public Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type);
|
---|
[6e7b472] | 16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.