1
2
3
4
5
6
7
8 package org.codehaus.plexus.security.authorization.rbac.jdo.v0_9_0;
9
10
11
12
13
14
15 public class JdoUserAssignment
16 extends org.codehaus.plexus.security.rbac.AbstractUserAssignment
17 implements org.codehaus.plexus.security.rbac.UserAssignment, java.io.Serializable
18 {
19
20
21
22
23
24
25
26
27 private String principal;
28
29
30
31
32 private java.util.Date timestamp;
33
34
35
36
37
38
39 private boolean permanent = false;
40
41
42
43
44 private java.util.List
45
46
47
48
49
50
51
52
53
54
55
56
57 public boolean equals( Object other )
58 {
59 if ( this == other )
60 {
61 return true;
62 }
63
64 if ( !( other instanceof JdoUserAssignment ) )
65 {
66 return false;
67 }
68
69 JdoUserAssignment that = (JdoUserAssignment) other;
70 boolean result = true;
71
72 result = result && ( getPrincipal() == null ? that.getPrincipal() == null : getPrincipal().equals( that.getPrincipal() ) );
73 result = result && ( super.equals( other ) );
74
75 return result;
76 }
77
78
79
80
81
82
83 public String getPrincipal()
84 {
85 return this.principal;
86 }
87
88
89
90
91
92
93 public java.util.List
94 {
95 return this.roleNames;
96 }
97
98
99
100
101
102
103 public java.util.Date getTimestamp()
104 {
105 return this.timestamp;
106 }
107
108
109
110
111
112
113 public int hashCode()
114 {
115 int result = 17;
116
117 result = 37 * result + ( principal != null ? principal.hashCode() : 0 );
118 result = 37 * result + super.hashCode();
119
120 return result;
121 }
122
123
124
125
126
127
128 public boolean isPermanent()
129 {
130 return this.permanent;
131 }
132
133
134
135
136
137
138 public void setPermanent( boolean permanent )
139 {
140 this.permanent = permanent;
141 }
142
143
144
145
146
147
148 public void setPrincipal( String principal )
149 {
150 this.principal = principal;
151 }
152
153
154
155
156
157
158 public void setRoleNames( java.util.List
159 {
160 this.roleNames = roleNames;
161 }
162
163
164
165
166
167
168 public void setTimestamp( java.util.Date timestamp )
169 {
170 this.timestamp = timestamp;
171 }
172
173
174
175
176
177
178 public java.lang.String toString()
179 {
180 StringBuffer buf = new StringBuffer( 128 );
181
182 buf.append( "principal = '" );
183 buf.append( getPrincipal() );
184 buf.append( "'" );
185 buf.append( "\n" );
186 buf.append( super.toString() );
187
188 return buf.toString();
189 }
190
191 }