View Javadoc

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