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