AccountService.java
795 Bytes
package org.legrog.web.account;
import org.legrog.entities.Account;
import org.legrog.entities.IndexedAccount;
import org.legrog.entities.SearchingException;
import javax.validation.constraints.NotNull;
import java.util.List;
public interface AccountService {
void addUser(Account account);
List<Account> getAllUsers();
Account findUserById(int id);
void updateUser(Account account);
/**
*
* @param string String searched in indexed Accounts
* @return indexed IndexedAccounts that match the String
*/
List<Account> search(@NotNull String string) throws SearchingException;
/**
*
* @param indexedAccounts IndexedAccount to convert
* @return Accounts
*/
List<Account> convert(List<IndexedAccount> indexedAccounts);
}