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.apache.maven.continuum.model.project;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.apache.continuum.model.project.ProjectScmRoot;
15  import org.apache.continuum.model.release.ContinuumReleaseResult;
16  import org.apache.continuum.model.repository.AbstractPurgeConfiguration;
17  import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
18  import org.apache.continuum.model.repository.DistributedDirectoryPurgeConfiguration;
19  import org.apache.continuum.model.repository.LocalRepository;
20  import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
21  import org.apache.maven.continuum.model.scm.ChangeFile;
22  import org.apache.maven.continuum.model.scm.ChangeSet;
23  import org.apache.maven.continuum.model.scm.ScmResult;
24  import org.apache.maven.continuum.model.system.Installation;
25  import org.apache.maven.continuum.model.system.NotificationAddress;
26  import org.apache.maven.continuum.model.system.Profile;
27  import org.apache.maven.continuum.model.system.SystemConfiguration;
28  import org.apache.maven.continuum.project.ContinuumProjectState;
29  
30  /**
31   * Template which contains some buildDefinitions.
32   * 
33   * @version $Revision$ $Date$
34   */
35  @SuppressWarnings( "all" )
36  public class BuildDefinitionTemplate
37      implements java.io.Serializable
38  {
39  
40        //--------------------------/
41       //- Class/Member Variables -/
42      //--------------------------/
43  
44      /**
45       * Field id.
46       */
47      private int id = 0;
48  
49      /**
50       * Field name.
51       */
52      private String name;
53  
54      /**
55       * 
56       *             true if this definition is a continuum default
57       * build def (cannot be removed)
58       *           .
59       */
60      private boolean continuumDefault = false;
61  
62      /**
63       * type of the buid BuildDefinitionTemplate use for default.
64       */
65      private String type;
66  
67      /**
68       * Field buildDefinitions.
69       */
70      private java.util.List<BuildDefinition> buildDefinitions;
71  
72  
73        //-----------/
74       //- Methods -/
75      //-----------/
76  
77      /**
78       * Method addBuildDefinition.
79       * 
80       * @param buildDefinition
81       */
82      public void addBuildDefinition( BuildDefinition buildDefinition )
83      {
84          getBuildDefinitions().add( buildDefinition );
85      } //-- void addBuildDefinition( BuildDefinition )
86  
87      /**
88       * Method equals.
89       * 
90       * @param other
91       * @return boolean
92       */
93      public boolean equals( Object other )
94      {
95          if ( this == other )
96          {
97              return true;
98          }
99  
100         if ( !( other instanceof BuildDefinitionTemplate ) )
101         {
102             return false;
103         }
104 
105         BuildDefinitionTemplate that = (BuildDefinitionTemplate) other;
106         boolean result = true;
107 
108         result = result && id == that.id;
109 
110         return result;
111     } //-- boolean equals( Object )
112 
113     /**
114      * Method getBuildDefinitions.
115      * 
116      * @return List
117      */
118     public java.util.List<BuildDefinition> getBuildDefinitions()
119     {
120         if ( this.buildDefinitions == null )
121         {
122             this.buildDefinitions = new java.util.ArrayList<BuildDefinition>();
123         }
124 
125         return this.buildDefinitions;
126     } //-- java.util.List<BuildDefinition> getBuildDefinitions()
127 
128     /**
129      * Get the id field.
130      * 
131      * @return int
132      */
133     public int getId()
134     {
135         return this.id;
136     } //-- int getId()
137 
138     /**
139      * Get the name field.
140      * 
141      * @return String
142      */
143     public String getName()
144     {
145         return this.name;
146     } //-- String getName()
147 
148     /**
149      * Get type of the buid BuildDefinitionTemplate use for
150      * default.
151      * 
152      * @return String
153      */
154     public String getType()
155     {
156         return this.type;
157     } //-- String getType()
158 
159     /**
160      * Method hashCode.
161      * 
162      * @return int
163      */
164     public int hashCode()
165     {
166         int result = 17;
167 
168         result = 37 * result + (int) id;
169 
170         return result;
171     } //-- int hashCode()
172 
173     /**
174      * Get true if this definition is a continuum default build def
175      * (cannot be removed).
176      * 
177      * @return boolean
178      */
179     public boolean isContinuumDefault()
180     {
181         return this.continuumDefault;
182     } //-- boolean isContinuumDefault()
183 
184     /**
185      * Method removeBuildDefinition.
186      * 
187      * @param buildDefinition
188      */
189     public void removeBuildDefinition( BuildDefinition buildDefinition )
190     {
191         getBuildDefinitions().remove( buildDefinition );
192     } //-- void removeBuildDefinition( BuildDefinition )
193 
194     /**
195      * Set the buildDefinitions field.
196      * 
197      * @param buildDefinitions
198      */
199     public void setBuildDefinitions( java.util.List<BuildDefinition> buildDefinitions )
200     {
201         this.buildDefinitions = buildDefinitions;
202     } //-- void setBuildDefinitions( java.util.List )
203 
204     /**
205      * Set true if this definition is a continuum default build def
206      * (cannot be removed).
207      * 
208      * @param continuumDefault
209      */
210     public void setContinuumDefault( boolean continuumDefault )
211     {
212         this.continuumDefault = continuumDefault;
213     } //-- void setContinuumDefault( boolean )
214 
215     /**
216      * Set the id field.
217      * 
218      * @param id
219      */
220     public void setId( int id )
221     {
222         this.id = id;
223     } //-- void setId( int )
224 
225     /**
226      * Set the name field.
227      * 
228      * @param name
229      */
230     public void setName( String name )
231     {
232         this.name = name;
233     } //-- void setName( String )
234 
235     /**
236      * Set type of the buid BuildDefinitionTemplate use for
237      * default.
238      * 
239      * @param type
240      */
241     public void setType( String type )
242     {
243         this.type = type;
244     } //-- void setType( String )
245 
246     /**
247      * Method toString.
248      * 
249      * @return String
250      */
251     public java.lang.String toString()
252     {
253         StringBuilder buf = new StringBuilder( 128 );
254 
255         buf.append( "id = '" );
256         buf.append( getId() );
257         buf.append( "'" );
258 
259         return buf.toString();
260     } //-- java.lang.String toString()
261 
262 }