From 8a0fbbd35c13054a947ea0d27ca117542bc452b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 May 2018 15:33:38 +0300 Subject: JPA WIP --- .../com/juick/service/data/UsersRepository.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 juick-server/src/main/java/com/juick/service/data/UsersRepository.java (limited to 'juick-server/src/main/java/com/juick/service/data/UsersRepository.java') diff --git a/juick-server/src/main/java/com/juick/service/data/UsersRepository.java b/juick-server/src/main/java/com/juick/service/data/UsersRepository.java new file mode 100644 index 00000000..b0a106e3 --- /dev/null +++ b/juick-server/src/main/java/com/juick/service/data/UsersRepository.java @@ -0,0 +1,23 @@ +package com.juick.service.data; + +import com.juick.service.data.entities.UserEntity; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import java.util.Collection; +import java.util.Optional; +import java.util.stream.Stream; + +@Repository +public interface UsersRepository extends CrudRepository { + Optional findById(Integer uid); + Optional findByName(String name); + Optional findByNameAndPassword(String name, String password); + Optional findByEmailsEmail(String email); + Stream findAllByNameIn(Collection names); + Stream findAllByIdIn(Collection uids); + Optional findByFacebookIds_FacebookId(Long facebookId); + Optional findByVkIds_VkId(Long vkId); + Optional findByLogins_Hash(String hash); + Optional findByTgIds_Identifier(Long telegramId); +} -- cgit v1.2.3