1 // =================== DO NOT EDIT THIS FILE ====================
2 // Generated by Modello 1.7,
3 // any modifications will be overwritten.
4 // ==============================================================
5
6 package org.apache.archiva.redback.rbac.jdo;
7
8 /**
9 * Class JdoOperation.
10 *
11 * @version $Revision$ $Date$
12 */
13 public class JdoOperation
14 implements org.apache.archiva.redback.rbac.Operation, java.io.Serializable
15 {
16
17 //--------------------------/
18 //- Class/Member Variables -/
19 //--------------------------/
20
21 /**
22 * Field name.
23 */
24 private String name;
25
26 /**
27 * Field description.
28 */
29 private String description;
30
31 /**
32 *
33 * true if this object is permanent.
34 *
35 */
36 private boolean permanent = false;
37
38 /**
39 *
40 * true if the resource is required for
41 * authorization to be granted
42 * .
43 */
44 private boolean resourceRequired = false;
45
46
47 //-----------/
48 //- Methods -/
49 //-----------/
50
51 /**
52 * Method equals.
53 *
54 * @param other
55 * @return boolean
56 */
57 public boolean equals( Object other )
58 {
59 if ( this == other )
60 {
61 return true;
62 }
63
64 if ( !( other instanceof JdoOperation ) )
65 {
66 return false;
67 }
68
69 JdoOperation that = (JdoOperation) other;
70 boolean result = true;
71
72 result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
73
74 return result;
75 } //-- boolean equals( Object )
76
77 /**
78 * Get the description field.
79 *
80 * @return String
81 */
82 public String getDescription()
83 {
84 return this.description;
85 } //-- String getDescription()
86
87 /**
88 * Get the name field.
89 *
90 * @return String
91 */
92 public String getName()
93 {
94 return this.name;
95 } //-- String getName()
96
97 /**
98 * Method hashCode.
99 *
100 * @return int
101 */
102 public int hashCode()
103 {
104 int result = 17;
105
106 result = 37 * result + ( name != null ? name.hashCode() : 0 );
107
108 return result;
109 } //-- int hashCode()
110
111 /**
112 * Get true if this object is permanent.
113 *
114 * @return boolean
115 */
116 public boolean isPermanent()
117 {
118 return this.permanent;
119 } //-- boolean isPermanent()
120
121 /**
122 * Get true if the resource is required for authorization to be
123 * granted.
124 *
125 * @return boolean
126 */
127 public boolean isResourceRequired()
128 {
129 return this.resourceRequired;
130 } //-- boolean isResourceRequired()
131
132 /**
133 * Set the description field.
134 *
135 * @param description
136 */
137 public void setDescription( String description )
138 {
139 this.description = description;
140 } //-- void setDescription( String )
141
142 /**
143 * Set the name field.
144 *
145 * @param name
146 */
147 public void setName( String name )
148 {
149 this.name = name;
150 } //-- void setName( String )
151
152 /**
153 * Set true if this object is permanent.
154 *
155 * @param permanent
156 */
157 public void setPermanent( boolean permanent )
158 {
159 this.permanent = permanent;
160 } //-- void setPermanent( boolean )
161
162 /**
163 * Set true if the resource is required for authorization to be
164 * granted.
165 *
166 * @param resourceRequired
167 */
168 public void setResourceRequired( boolean resourceRequired )
169 {
170 this.resourceRequired = resourceRequired;
171 } //-- void setResourceRequired( boolean )
172
173 /**
174 * Method toString.
175 *
176 * @return String
177 */
178 public java.lang.String toString()
179 {
180 StringBuffer buf = new StringBuffer( 128 );
181
182 buf.append( "name = '" );
183 buf.append( getName() );
184 buf.append( "'" );
185
186 return buf.toString();
187 } //-- java.lang.String toString()
188
189 }