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
|
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 Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type);
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.