001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.7, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.archiva.model; 007 008/** 009 * Class ArchivaArtifactModel. 010 * 011 * @version $Revision$ $Date$ 012 */ 013@SuppressWarnings( "all" ) 014public class ArchivaArtifactModel 015 implements java.io.Serializable 016{ 017 018 //--------------------------/ 019 //- Class/Member Variables -/ 020 //--------------------------/ 021 022 /** 023 * 024 * The Group ID of the repository content. 025 * 026 */ 027 private String groupId; 028 029 /** 030 * 031 * The Artifact ID of the repository content. 032 * 033 */ 034 private String artifactId; 035 036 /** 037 * 038 * The version of the repository content. 039 * 040 */ 041 private String version; 042 043 /** 044 * 045 * The classifier for this artifact. 046 * 047 */ 048 private String classifier; 049 050 /** 051 * 052 * The type of artifact. 053 * 054 */ 055 private String type; 056 057 /** 058 * 059 * The repository associated with this content. 060 * 061 */ 062 private String repositoryId; 063 064 /** 065 * 066 * True if this is a snapshot. 067 * 068 */ 069 private boolean snapshot = false; 070 071 /** 072 * 073 * The MD5 checksum for the artifact file. 074 * 075 */ 076 private String checksumMD5; 077 078 /** 079 * 080 * The SHA1 checksum for the artifact file. 081 * 082 */ 083 private String checksumSHA1; 084 085 /** 086 * 087 * The Last Modified Timestamp of this artifact. 088 * 089 */ 090 private java.util.Date lastModified; 091 092 /** 093 * 094 * The size of the artifact on disk. 095 * 096 */ 097 private long size = 0L; 098 099 /** 100 * 101 * When this artifact was gathered or discovered 102 * from the repository. 103 * 104 */ 105 private java.util.Date whenGathered; 106 107 108 //-----------/ 109 //- Methods -/ 110 //-----------/ 111 112 /** 113 * Method equals. 114 * 115 * @param other 116 * @return boolean 117 */ 118 public boolean equals( Object other ) 119 { 120 if ( this == other ) 121 { 122 return true; 123 } 124 125 if ( !( other instanceof ArchivaArtifactModel ) ) 126 { 127 return false; 128 } 129 130 ArchivaArtifactModel that = (ArchivaArtifactModel) other; 131 boolean result = true; 132 133 result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) ); 134 result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); 135 result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); 136 result = result && ( getClassifier() == null ? that.getClassifier() == null : getClassifier().equals( that.getClassifier() ) ); 137 result = result && ( getType() == null ? that.getType() == null : getType().equals( that.getType() ) ); 138 result = result && ( getRepositoryId() == null ? that.getRepositoryId() == null : getRepositoryId().equals( that.getRepositoryId() ) ); 139 140 return result; 141 } //-- boolean equals( Object ) 142 143 /** 144 * Get the Artifact ID of the repository content. 145 * 146 * @return String 147 */ 148 public String getArtifactId() 149 { 150 return this.artifactId; 151 } //-- String getArtifactId() 152 153 /** 154 * Get the MD5 checksum for the artifact file. 155 * 156 * @return String 157 */ 158 public String getChecksumMD5() 159 { 160 return this.checksumMD5; 161 } //-- String getChecksumMD5() 162 163 /** 164 * Get the SHA1 checksum for the artifact file. 165 * 166 * @return String 167 */ 168 public String getChecksumSHA1() 169 { 170 return this.checksumSHA1; 171 } //-- String getChecksumSHA1() 172 173 /** 174 * Get the classifier for this artifact. 175 * 176 * @return String 177 */ 178 public String getClassifier() 179 { 180 return this.classifier; 181 } //-- String getClassifier() 182 183 /** 184 * Get the Group ID of the repository content. 185 * 186 * @return String 187 */ 188 public String getGroupId() 189 { 190 return this.groupId; 191 } //-- String getGroupId() 192 193 /** 194 * Get the Last Modified Timestamp of this artifact. 195 * 196 * @return Date 197 */ 198 public java.util.Date getLastModified() 199 { 200 return this.lastModified; 201 } //-- java.util.Date getLastModified() 202 203 /** 204 * Get the repository associated with this content. 205 * 206 * @return String 207 */ 208 public String getRepositoryId() 209 { 210 return this.repositoryId; 211 } //-- String getRepositoryId() 212 213 /** 214 * Get the size of the artifact on disk. 215 * 216 * @return long 217 */ 218 public long getSize() 219 { 220 return this.size; 221 } //-- long getSize() 222 223 /** 224 * Get the type of artifact. 225 * 226 * @return String 227 */ 228 public String getType() 229 { 230 return this.type; 231 } //-- String getType() 232 233 /** 234 * Get the version of the repository content. 235 * 236 * @return String 237 */ 238 public String getVersion() 239 { 240 return this.version; 241 } //-- String getVersion() 242 243 /** 244 * Get when this artifact was gathered or discovered from the 245 * repository. 246 * 247 * @return Date 248 */ 249 public java.util.Date getWhenGathered() 250 { 251 return this.whenGathered; 252 } //-- java.util.Date getWhenGathered() 253 254 /** 255 * Method hashCode. 256 * 257 * @return int 258 */ 259 public int hashCode() 260 { 261 int result = 17; 262 263 result = 37 * result + ( groupId != null ? groupId.hashCode() : 0 ); 264 result = 37 * result + ( artifactId != null ? artifactId.hashCode() : 0 ); 265 result = 37 * result + ( version != null ? version.hashCode() : 0 ); 266 result = 37 * result + ( classifier != null ? classifier.hashCode() : 0 ); 267 result = 37 * result + ( type != null ? type.hashCode() : 0 ); 268 result = 37 * result + ( repositoryId != null ? repositoryId.hashCode() : 0 ); 269 270 return result; 271 } //-- int hashCode() 272 273 /** 274 * Get true if this is a snapshot. 275 * 276 * @return boolean 277 */ 278 public boolean isSnapshot() 279 { 280 return this.snapshot; 281 } //-- boolean isSnapshot() 282 283 /** 284 * Set the Artifact ID of the repository content. 285 * 286 * @param artifactId 287 */ 288 public void setArtifactId( String artifactId ) 289 { 290 this.artifactId = artifactId; 291 } //-- void setArtifactId( String ) 292 293 /** 294 * Set the MD5 checksum for the artifact file. 295 * 296 * @param checksumMD5 297 */ 298 public void setChecksumMD5( String checksumMD5 ) 299 { 300 this.checksumMD5 = checksumMD5; 301 } //-- void setChecksumMD5( String ) 302 303 /** 304 * Set the SHA1 checksum for the artifact file. 305 * 306 * @param checksumSHA1 307 */ 308 public void setChecksumSHA1( String checksumSHA1 ) 309 { 310 this.checksumSHA1 = checksumSHA1; 311 } //-- void setChecksumSHA1( String ) 312 313 /** 314 * Set the classifier for this artifact. 315 * 316 * @param classifier 317 */ 318 public void setClassifier( String classifier ) 319 { 320 this.classifier = classifier; 321 } //-- void setClassifier( String ) 322 323 /** 324 * Set the Group ID of the repository content. 325 * 326 * @param groupId 327 */ 328 public void setGroupId( String groupId ) 329 { 330 this.groupId = groupId; 331 } //-- void setGroupId( String ) 332 333 /** 334 * Set the Last Modified Timestamp of this artifact. 335 * 336 * @param lastModified 337 */ 338 public void setLastModified( java.util.Date lastModified ) 339 { 340 this.lastModified = lastModified; 341 } //-- void setLastModified( java.util.Date ) 342 343 /** 344 * Set the repository associated with this content. 345 * 346 * @param repositoryId 347 */ 348 public void setRepositoryId( String repositoryId ) 349 { 350 this.repositoryId = repositoryId; 351 } //-- void setRepositoryId( String ) 352 353 /** 354 * Set the size of the artifact on disk. 355 * 356 * @param size 357 */ 358 public void setSize( long size ) 359 { 360 this.size = size; 361 } //-- void setSize( long ) 362 363 /** 364 * Set true if this is a snapshot. 365 * 366 * @param snapshot 367 */ 368 public void setSnapshot( boolean snapshot ) 369 { 370 this.snapshot = snapshot; 371 } //-- void setSnapshot( boolean ) 372 373 /** 374 * Set the type of artifact. 375 * 376 * @param type 377 */ 378 public void setType( String type ) 379 { 380 this.type = type; 381 } //-- void setType( String ) 382 383 /** 384 * Set the version of the repository content. 385 * 386 * @param version 387 */ 388 public void setVersion( String version ) 389 { 390 this.version = version; 391 } //-- void setVersion( String ) 392 393 /** 394 * Set when this artifact was gathered or discovered from the 395 * repository. 396 * 397 * @param whenGathered 398 */ 399 public void setWhenGathered( java.util.Date whenGathered ) 400 { 401 this.whenGathered = whenGathered; 402 } //-- void setWhenGathered( java.util.Date ) 403 404 /** 405 * Method toString. 406 * 407 * @return String 408 */ 409 public java.lang.String toString() 410 { 411 StringBuilder buf = new StringBuilder( 128 ); 412 413 buf.append( "groupId = '" ); 414 buf.append( getGroupId() ); 415 buf.append( "'" ); 416 buf.append( "\n" ); 417 buf.append( "artifactId = '" ); 418 buf.append( getArtifactId() ); 419 buf.append( "'" ); 420 buf.append( "\n" ); 421 buf.append( "version = '" ); 422 buf.append( getVersion() ); 423 buf.append( "'" ); 424 buf.append( "\n" ); 425 buf.append( "classifier = '" ); 426 buf.append( getClassifier() ); 427 buf.append( "'" ); 428 buf.append( "\n" ); 429 buf.append( "type = '" ); 430 buf.append( getType() ); 431 buf.append( "'" ); 432 buf.append( "\n" ); 433 buf.append( "repositoryId = '" ); 434 buf.append( getRepositoryId() ); 435 buf.append( "'" ); 436 437 return buf.toString(); 438 } //-- java.lang.String toString() 439 440 441 private static final long serialVersionUID = -6292417108113887384L; 442 443}