AccountService.java
1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.legrog.web.account;
import org.legrog.entities.Account;
import org.legrog.entities.IndexedAccount;
import org.legrog.entities.IndexingException;
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 Account List
*/
List<Account> convertIndexedAccountsIntoAccounts(List<IndexedAccount> indexedAccounts);
/**
*
* @return number of indexed accounts
*/
public int reindexAllAccounts() throws IndexingException;
}