View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.1 on 2011-09-18 14:33:27,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.continuum.model.project.v1_0_9;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.apache.maven.continuum.model.scm.v1_0_9.ChangeFile;
15  import org.apache.maven.continuum.model.scm.v1_0_9.ChangeSet;
16  import org.apache.maven.continuum.model.scm.v1_0_9.ScmResult;
17  import org.apache.maven.continuum.model.scm.v1_0_9.SuiteResult;
18  import org.apache.maven.continuum.model.scm.v1_0_9.TestCaseFailure;
19  import org.apache.maven.continuum.model.scm.v1_0_9.TestResult;
20  import org.apache.maven.continuum.model.system.v1_0_9.NotificationAddress;
21  import org.apache.maven.continuum.model.system.v1_0_9.SystemConfiguration;
22  
23  /**
24   * 
25   *         This class is a single continuum build.
26   *       
27   * 
28   * @version $Revision$ $Date$
29   */
30  @SuppressWarnings( "all" )
31  public class BuildResult
32      implements java.io.Serializable
33  {
34  
35        //--------------------------/
36       //- Class/Member Variables -/
37      //--------------------------/
38  
39      /**
40       * Field project.
41       */
42      private Project project;
43  
44      /**
45       * Field id.
46       */
47      private int id = 0;
48  
49      /**
50       * Field buildNumber.
51       */
52      private int buildNumber = 0;
53  
54      /**
55       * Field state.
56       */
57      private int state = 0;
58  
59      /**
60       * Field trigger.
61       */
62      private int trigger = 0;
63  
64      /**
65       * Field startTime.
66       */
67      private long startTime = 0L;
68  
69      /**
70       * Field endTime.
71       */
72      private long endTime = 0L;
73  
74      /**
75       * Field error.
76       */
77      private String error;
78  
79      /**
80       * Field success.
81       */
82      private boolean success = false;
83  
84      /**
85       * Field exitCode.
86       */
87      private int exitCode = 0;
88  
89      /**
90       * Field scmResult.
91       */
92      private ScmResult scmResult;
93  
94      /**
95       * Field testResult.
96       */
97      private TestResult testResult;
98  
99  
100       //-----------/
101      //- Methods -/
102     //-----------/
103 
104     /**
105      * Method breakProjectAssociation.
106      * 
107      * @param project
108      */
109     public void breakProjectAssociation( Project project )
110     {
111         if ( this.project != project )
112         {
113             throw new IllegalStateException( "project isn't associated." );
114         }
115 
116         this.project = null;
117     } //-- void breakProjectAssociation( Project )
118 
119     /**
120      * Method createProjectAssociation.
121      * 
122      * @param project
123      */
124     public void createProjectAssociation( Project project )
125     {
126         if ( this.project != null )
127         {
128             breakProjectAssociation( this.project );
129         }
130 
131         this.project = project;
132     } //-- void createProjectAssociation( Project )
133 
134     /**
135      * Method equals.
136      * 
137      * @param other
138      * @return boolean
139      */
140     public boolean equals( Object other )
141     {
142         if ( this == other )
143         {
144             return true;
145         }
146 
147         if ( !( other instanceof BuildResult ) )
148         {
149             return false;
150         }
151 
152         BuildResult that = (BuildResult) other;
153         boolean result = true;
154 
155         result = result && id == that.id;
156 
157         return result;
158     } //-- boolean equals( Object )
159 
160     /**
161      * Get the buildNumber field.
162      * 
163      * @return int
164      */
165     public int getBuildNumber()
166     {
167         return this.buildNumber;
168     } //-- int getBuildNumber()
169 
170     /**
171      * Get the endTime field.
172      * 
173      * @return long
174      */
175     public long getEndTime()
176     {
177         return this.endTime;
178     } //-- long getEndTime()
179 
180     /**
181      * Get the error field.
182      * 
183      * @return String
184      */
185     public String getError()
186     {
187         return this.error;
188     } //-- String getError()
189 
190     /**
191      * Get the exitCode field.
192      * 
193      * @return int
194      */
195     public int getExitCode()
196     {
197         return this.exitCode;
198     } //-- int getExitCode()
199 
200     /**
201      * Get the id field.
202      * 
203      * @return int
204      */
205     public int getId()
206     {
207         return this.id;
208     } //-- int getId()
209 
210     /**
211      * Get the project field.
212      * 
213      * @return Project
214      */
215     public Project getProject()
216     {
217         return this.project;
218     } //-- Project getProject()
219 
220     /**
221      * Get the scmResult field.
222      * 
223      * @return ScmResult
224      */
225     public ScmResult getScmResult()
226     {
227         return this.scmResult;
228     } //-- ScmResult getScmResult()
229 
230     /**
231      * Get the startTime field.
232      * 
233      * @return long
234      */
235     public long getStartTime()
236     {
237         return this.startTime;
238     } //-- long getStartTime()
239 
240     /**
241      * Get the state field.
242      * 
243      * @return int
244      */
245     public int getState()
246     {
247         return this.state;
248     } //-- int getState()
249 
250     /**
251      * Get the testResult field.
252      * 
253      * @return TestResult
254      */
255     public TestResult getTestResult()
256     {
257         return this.testResult;
258     } //-- TestResult getTestResult()
259 
260     /**
261      * Get the trigger field.
262      * 
263      * @return int
264      */
265     public int getTrigger()
266     {
267         return this.trigger;
268     } //-- int getTrigger()
269 
270     /**
271      * Method hashCode.
272      * 
273      * @return int
274      */
275     public int hashCode()
276     {
277         int result = 17;
278 
279         result = 37 * result + (int) id;
280 
281         return result;
282     } //-- int hashCode()
283 
284     /**
285      * Get the success field.
286      * 
287      * @return boolean
288      */
289     public boolean isSuccess()
290     {
291         return this.success;
292     } //-- boolean isSuccess()
293 
294     /**
295      * Set the buildNumber field.
296      * 
297      * @param buildNumber
298      */
299     public void setBuildNumber( int buildNumber )
300     {
301         this.buildNumber = buildNumber;
302     } //-- void setBuildNumber( int )
303 
304     /**
305      * Set the endTime field.
306      * 
307      * @param endTime
308      */
309     public void setEndTime( long endTime )
310     {
311         this.endTime = endTime;
312     } //-- void setEndTime( long )
313 
314     /**
315      * Set the error field.
316      * 
317      * @param error
318      */
319     public void setError( String error )
320     {
321         this.error = error;
322     } //-- void setError( String )
323 
324     /**
325      * Set the exitCode field.
326      * 
327      * @param exitCode
328      */
329     public void setExitCode( int exitCode )
330     {
331         this.exitCode = exitCode;
332     } //-- void setExitCode( int )
333 
334     /**
335      * Set the id field.
336      * 
337      * @param id
338      */
339     public void setId( int id )
340     {
341         this.id = id;
342     } //-- void setId( int )
343 
344     /**
345      * Set the project field.
346      * 
347      * @param project
348      */
349     public void setProject( Project project )
350     {
351         if ( this.project != null )
352         {
353             this.project.breakBuildResultAssociation( this );
354         }
355 
356         this.project = project;
357 
358         if ( project != null )
359         {
360             this.project.createBuildResultAssociation( this );
361         }
362     } //-- void setProject( Project )
363 
364     /**
365      * Set the scmResult field.
366      * 
367      * @param scmResult
368      */
369     public void setScmResult( ScmResult scmResult )
370     {
371         this.scmResult = scmResult;
372     } //-- void setScmResult( ScmResult )
373 
374     /**
375      * Set the startTime field.
376      * 
377      * @param startTime
378      */
379     public void setStartTime( long startTime )
380     {
381         this.startTime = startTime;
382     } //-- void setStartTime( long )
383 
384     /**
385      * Set the state field.
386      * 
387      * @param state
388      */
389     public void setState( int state )
390     {
391         this.state = state;
392     } //-- void setState( int )
393 
394     /**
395      * Set the success field.
396      * 
397      * @param success
398      */
399     public void setSuccess( boolean success )
400     {
401         this.success = success;
402     } //-- void setSuccess( boolean )
403 
404     /**
405      * Set the testResult field.
406      * 
407      * @param testResult
408      */
409     public void setTestResult( TestResult testResult )
410     {
411         this.testResult = testResult;
412     } //-- void setTestResult( TestResult )
413 
414     /**
415      * Set the trigger field.
416      * 
417      * @param trigger
418      */
419     public void setTrigger( int trigger )
420     {
421         this.trigger = trigger;
422     } //-- void setTrigger( int )
423 
424     /**
425      * Method toString.
426      * 
427      * @return String
428      */
429     public java.lang.String toString()
430     {
431         StringBuilder buf = new StringBuilder( 128 );
432 
433         buf.append( "id = '" );
434         buf.append( getId() );
435         buf.append( "'" );
436 
437         return buf.toString();
438     } //-- java.lang.String toString()
439 
440 }