2023-10-25 10:14:59 +00:00
|
|
|
package com.example.springdemo.service;
|
|
|
|
|
|
|
|
import com.example.springdemo.entities.Users;
|
2023-11-06 08:56:22 +00:00
|
|
|
import com.example.springdemo.entities.password.UsersPassword;
|
2023-10-25 10:14:59 +00:00
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
public interface UsersService {
|
|
|
|
|
2023-10-26 03:33:56 +00:00
|
|
|
Users addUsers(Users user);
|
2023-10-25 10:14:59 +00:00
|
|
|
|
2023-11-06 08:56:22 +00:00
|
|
|
void deleteUsersById(Long userID);
|
|
|
|
|
|
|
|
void deleteUsersByName(String name);
|
2023-10-25 10:14:59 +00:00
|
|
|
|
|
|
|
Users updateUsers(Users user);
|
|
|
|
|
2023-10-26 03:33:56 +00:00
|
|
|
Iterable<Users> findAllUsers();
|
2023-10-25 10:14:59 +00:00
|
|
|
|
2023-11-06 08:56:22 +00:00
|
|
|
Optional<Users> findById(Long userID);
|
2023-10-25 10:14:59 +00:00
|
|
|
|
|
|
|
Users findByName(String name);
|
2023-11-06 08:56:22 +00:00
|
|
|
|
|
|
|
void addPassword(UsersPassword usersPassword);
|
|
|
|
|
|
|
|
void updatePassword(String password, Long userID);
|
|
|
|
|
|
|
|
void deletePasswordById(Long userID);
|
2023-10-25 10:14:59 +00:00
|
|
|
}
|