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