1 package net.avcompris.examples.users3.api;
2
3 import javax.annotation.Nullable;
4
5 import net.avcompris.commons3.api.EntitiesQuery;
6 import net.avcompris.examples.users3.query.UserFiltering;
7
8 public interface UsersQuery extends EntitiesQuery<UserFiltering, UserFiltering.Field> {
9
10 @Override
11 SortBy[] getSortBys();
12
13 @Override
14 Expand[] getExpands();
15
16 UsersQuery setFiltering(@Nullable UserFiltering filtering);
17
18 UsersQuery setSortBys(SortBy... sortBys);
19
20 UsersQuery setExpands(Expand... expands);
21
22 enum SortBy {
23
24 SORT_BY_USERNAME, SORT_BY_USERNAME_DESC,
25 SORT_BY_ROLE, SORT_BY_ROLE_DESC,
26 SORT_BY_ENABLED, SORT_BY_ENABLED_DESC,
27 SORT_BY_CREATED_AT, SORT_BY_CREATED_AT_DESC,
28 SORT_BY_UPDATED_AT, SORT_BY_UPDATED_AT_DESC,
29 SORT_BY_LAST_ACTIVE_AT, SORT_BY_LAST_ACTIVE_AT_DESC,
30 SORT_BY_REVISION, SORT_BY_REVISION_DESC,
31 }
32
33 interface Expand {
34
35 }
36
37 UsersQuery setStart(@Nullable Integer start);
38
39 UsersQuery setLimit(@Nullable Integer limit);
40 }