main
Last change
on this file since 3ded84d was 3ded84d, checked in by Test <matonikolov77@…>, 2 years ago |
Model-database resolved bugs for mapping
|
-
Property mode
set to
100644
|
File size:
716 bytes
|
Line | |
---|
1 | package com.wediscussmovies.project.repository;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.model.*;
|
---|
4 | import com.wediscussmovies.project.model.enumerations.PersonType;
|
---|
5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
6 | import org.springframework.stereotype.Repository;
|
---|
7 |
|
---|
8 | import java.util.List;
|
---|
9 | import java.util.Optional;
|
---|
10 |
|
---|
11 | @Repository
|
---|
12 | public interface PersonRepository extends JpaRepository<Person, Integer> {
|
---|
13 | public List<Person> findAllByType(Character type);
|
---|
14 | public List<Person> findAllByTypeAndNameLike(Character type, String name);
|
---|
15 | public List<Person> findAllByTypeAndSurnameLike(Character type, String surname);
|
---|
16 | public Optional<Person> findPersonByPersonIdAndType(Integer id, Character type);
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.