This project has retired. For details please refer to its
Attic page.
AbstractUserQuery xref
1 package org.apache.archiva.redback.users;
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 public abstract class AbstractUserQuery
27 implements UserQuery
28 {
29
30 private String username;
31
32 private String fullName;
33
34 private String email;
35
36 private long maxResults = -1;
37
38 private long firstResult;
39
40 private String orderBy = ORDER_BY_USERNAME;
41
42 private boolean ascending = true;
43
44 public String getUsername()
45 {
46 return username;
47 }
48
49 public void setUsername( String userName )
50 {
51 this.username = userName;
52 }
53
54 public String getFullName()
55 {
56 return fullName;
57 }
58
59 public void setFullName( String fullName )
60 {
61 this.fullName = fullName;
62 }
63
64 public String getEmail()
65 {
66 return email;
67 }
68
69 public void setEmail( String email )
70 {
71 this.email = email;
72 }
73
74 public long getFirstResult()
75 {
76 return firstResult;
77 }
78
79 public void setFirstResult( int firstResult )
80 {
81 this.firstResult = firstResult;
82 }
83
84 public long getMaxResults()
85 {
86 return maxResults;
87 }
88
89 public void setMaxResults( int maxResults )
90 {
91 this.maxResults = maxResults;
92 }
93
94 public String getOrderBy()
95 {
96 return orderBy;
97 }
98
99 public void setOrderBy( String orderBy )
100 {
101 if ( orderBy == null )
102 {
103 throw new IllegalArgumentException( "orderBy cannot be set to null" );
104 }
105 else if ( !ALLOWED_ORDER_FIELDS.contains( orderBy ) )
106 {
107 throw new IllegalArgumentException( orderBy + " is not an allowed orderBy field: " + orderBy );
108 }
109 this.orderBy = orderBy;
110 }
111
112 public boolean isAscending()
113 {
114 return ascending;
115 }
116
117 public void setAscending( boolean ascending )
118 {
119 this.ascending = ascending;
120 }
121
122 }