This project has retired. For details please refer to its Attic page.
ProjectReference xref
View Javadoc
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.model;
7   
8   /**
9    * A reference to another (unversioned) Project.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class ProjectReference
15      implements java.io.Serializable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *             The Group ID of the project reference.
25       *           
26       */
27      private String groupId;
28  
29      /**
30       * 
31       *             The Artifact ID of the project reference.
32       *           
33       */
34      private String artifactId;
35  
36  
37        //-----------/
38       //- Methods -/
39      //-----------/
40  
41      /**
42       * Get the Artifact ID of the project reference.
43       * 
44       * @return String
45       */
46      public String getArtifactId()
47      {
48          return this.artifactId;
49      } //-- String getArtifactId()
50  
51      /**
52       * Get the Group ID of the project reference.
53       * 
54       * @return String
55       */
56      public String getGroupId()
57      {
58          return this.groupId;
59      } //-- String getGroupId()
60  
61      /**
62       * Set the Artifact ID of the project reference.
63       * 
64       * @param artifactId
65       */
66      public void setArtifactId( String artifactId )
67      {
68          this.artifactId = artifactId;
69      } //-- void setArtifactId( String )
70  
71      /**
72       * Set the Group ID of the project reference.
73       * 
74       * @param groupId
75       */
76      public void setGroupId( String groupId )
77      {
78          this.groupId = groupId;
79      } //-- void setGroupId( String )
80  
81      
82      private static final long serialVersionUID = 8947981859537138991L;
83            
84      
85      private static String defaultString( String value )
86      {
87          if ( value == null )
88          {
89              return "";
90          }
91          
92          return value.trim();
93      }
94            
95      public static String toKey( ProjectReference reference )
96      {
97          StringBuilder key = new StringBuilder();
98  
99          key.append( defaultString( reference.getGroupId() ) ).append( ":" );
100         key.append( defaultString( reference.getArtifactId() ) );
101 
102         return key.toString();
103     }
104           
105 }