Changeset 2a5d6a3 in Git for src/main/java/com/wediscussmovies/project/repository
- Timestamp:
- 01/16/22 15:29:49 (3 years ago)
- Branches:
- main
- Children:
- 7bc8942
- Parents:
- 7a0bf79
- Location:
- src/main/java/com/wediscussmovies/project/repository
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/repository/DiscussionRepository.java
r7a0bf79 r2a5d6a3 5 5 import org.springframework.stereotype.Repository; 6 6 7 import java.util.List; 8 7 9 @Repository 8 10 public interface DiscussionRepository extends JpaRepository<Discussion, Integer> { 11 public List<Discussion> findAllByTitleLike(String title); 9 12 } -
src/main/java/com/wediscussmovies/project/repository/PersonRepository.java
r7a0bf79 r2a5d6a3 13 13 public interface PersonRepository extends JpaRepository<Person, Integer> { 14 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); 15 17 public Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type); 16 18 } -
src/main/java/com/wediscussmovies/project/repository/UserRepository.java
r7a0bf79 r2a5d6a3 5 5 import org.springframework.stereotype.Repository; 6 6 7 import java.util.EnumMap; 8 import java.util.Optional; 9 7 10 @Repository 8 11 public interface UserRepository extends JpaRepository<User, Integer> { 12 public Optional<User> findByEmailAndPassword(String email, String password); 13 public Optional<User> findByUsernameAndPassword(String email, String password); 14 public Optional<User> findByUsername(String username); 15 public Optional<User> findByEmail(String email); 9 16 }
Note:
See TracChangeset
for help on using the changeset viewer.