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 java.util.Collection;
15  import org.apache.maven.continuum.model.scm.v1_0_9.ChangeFile;
16  import org.apache.maven.continuum.model.scm.v1_0_9.ChangeSet;
17  import org.apache.maven.continuum.model.scm.v1_0_9.ScmResult;
18  import org.apache.maven.continuum.model.scm.v1_0_9.SuiteResult;
19  import org.apache.maven.continuum.model.scm.v1_0_9.TestCaseFailure;
20  import org.apache.maven.continuum.model.scm.v1_0_9.TestResult;
21  import org.apache.maven.continuum.model.system.v1_0_9.NotificationAddress;
22  import org.apache.maven.continuum.model.system.v1_0_9.SystemConfiguration;
23  
24  /**
25   * Class Project.
26   * 
27   * @version $Revision$ $Date$
28   */
29  @SuppressWarnings( "all" )
30  public class Project
31      implements java.io.Serializable
32  {
33  
34        //--------------------------/
35       //- Class/Member Variables -/
36      //--------------------------/
37  
38      /**
39       * Field id.
40       */
41      private int id = 0;
42  
43      /**
44       * Field groupId.
45       */
46      private String groupId;
47  
48      /**
49       * Field artifactId.
50       */
51      private String artifactId;
52  
53      /**
54       * Field executorId.
55       */
56      private String executorId;
57  
58      /**
59       * Field name.
60       */
61      private String name;
62  
63      /**
64       * Field description.
65       */
66      private String description;
67  
68      /**
69       * Field url.
70       */
71      private String url;
72  
73      /**
74       * Field scmUrl.
75       */
76      private String scmUrl;
77  
78      /**
79       * Field scmTag.
80       */
81      private String scmTag;
82  
83      /**
84       * Field scmUsername.
85       */
86      private String scmUsername;
87  
88      /**
89       * Field scmPassword.
90       */
91      private String scmPassword;
92  
93      /**
94       * Field version.
95       */
96      private String version;
97  
98      /**
99       * Field state.
100      */
101     private int state = 1;
102 
103     /**
104      * Field oldState.
105      */
106     private int oldState = 0;
107 
108     /**
109      * Field latestBuildId.
110      */
111     private int latestBuildId = 0;
112 
113     /**
114      * Field buildNumber.
115      */
116     private int buildNumber = 0;
117 
118     /**
119      * Field workingDirectory.
120      */
121     private String workingDirectory;
122 
123     /**
124      * Field buildResults.
125      */
126     private java.util.List<BuildResult> buildResults;
127 
128     /**
129      * Field checkoutResult.
130      */
131     private ScmResult checkoutResult;
132 
133     /**
134      * Field developers.
135      */
136     private java.util.List<ProjectDeveloper> developers;
137 
138     /**
139      * Field parent.
140      */
141     private ProjectDependency parent;
142 
143     /**
144      * Field dependencies.
145      */
146     private java.util.List<ProjectDependency> dependencies;
147 
148     /**
149      * Field projectGroup.
150      */
151     private ProjectGroup projectGroup;
152 
153     /**
154      * Field notifiers.
155      */
156     private java.util.List<ProjectNotifier> notifiers;
157 
158     /**
159      * Field buildDefinitions.
160      */
161     private java.util.List<BuildDefinition> buildDefinitions;
162 
163 
164       //-----------/
165      //- Methods -/
166     //-----------/
167 
168     /**
169      * Method addBuildDefinition.
170      * 
171      * @param buildDefinition
172      */
173     public void addBuildDefinition( BuildDefinition buildDefinition )
174     {
175         getBuildDefinitions().add( buildDefinition );
176     } //-- void addBuildDefinition( BuildDefinition )
177 
178     /**
179      * Method addBuildResult.
180      * 
181      * @param buildResult
182      */
183     public void addBuildResult( BuildResult buildResult )
184     {
185         getBuildResults().add( buildResult );
186         buildResult.createProjectAssociation( this );
187     } //-- void addBuildResult( BuildResult )
188 
189     /**
190      * Method addDependency.
191      * 
192      * @param projectDependency
193      */
194     public void addDependency( ProjectDependency projectDependency )
195     {
196         getDependencies().add( projectDependency );
197     } //-- void addDependency( ProjectDependency )
198 
199     /**
200      * Method addDeveloper.
201      * 
202      * @param projectDeveloper
203      */
204     public void addDeveloper( ProjectDeveloper projectDeveloper )
205     {
206         getDevelopers().add( projectDeveloper );
207     } //-- void addDeveloper( ProjectDeveloper )
208 
209     /**
210      * Method addNotifier.
211      * 
212      * @param projectNotifier
213      */
214     public void addNotifier( ProjectNotifier projectNotifier )
215     {
216         getNotifiers().add( projectNotifier );
217     } //-- void addNotifier( ProjectNotifier )
218 
219     /**
220      * Method breakBuildResultAssociation.
221      * 
222      * @param buildResult
223      */
224     public void breakBuildResultAssociation( BuildResult buildResult )
225     {
226         if ( ! getBuildResults().contains( buildResult ) )
227         {
228             throw new IllegalStateException( "buildResult isn't associated." );
229         }
230 
231         getBuildResults().remove( buildResult );
232     } //-- void breakBuildResultAssociation( BuildResult )
233 
234     /**
235      * Method breakProjectGroupAssociation.
236      * 
237      * @param projectGroup
238      */
239     public void breakProjectGroupAssociation( ProjectGroup projectGroup )
240     {
241         if ( this.projectGroup != projectGroup )
242         {
243             throw new IllegalStateException( "projectGroup isn't associated." );
244         }
245 
246         this.projectGroup = null;
247     } //-- void breakProjectGroupAssociation( ProjectGroup )
248 
249     /**
250      * Method createBuildResultAssociation.
251      * 
252      * @param buildResult
253      */
254     public void createBuildResultAssociation( BuildResult buildResult )
255     {
256         Collection buildResults = getBuildResults();
257 
258         if ( buildResults.contains( buildResult ) )
259         {
260             throw new IllegalStateException( "buildResult is already assigned." );
261         }
262 
263         buildResults.add( buildResult );
264     } //-- void createBuildResultAssociation( BuildResult )
265 
266     /**
267      * Method createProjectGroupAssociation.
268      * 
269      * @param projectGroup
270      */
271     public void createProjectGroupAssociation( ProjectGroup projectGroup )
272     {
273         if ( this.projectGroup != null )
274         {
275             breakProjectGroupAssociation( this.projectGroup );
276         }
277 
278         this.projectGroup = projectGroup;
279     } //-- void createProjectGroupAssociation( ProjectGroup )
280 
281     /**
282      * Method equals.
283      * 
284      * @param other
285      * @return boolean
286      */
287     public boolean equals( Object other )
288     {
289         if ( this == other )
290         {
291             return true;
292         }
293 
294         if ( !( other instanceof Project ) )
295         {
296             return false;
297         }
298 
299         Project that = (Project) other;
300         boolean result = true;
301 
302         result = result && id == that.id;
303 
304         return result;
305     } //-- boolean equals( Object )
306 
307     /**
308      * Get the artifactId field.
309      * 
310      * @return String
311      */
312     public String getArtifactId()
313     {
314         return this.artifactId;
315     } //-- String getArtifactId()
316 
317     /**
318      * Method getBuildDefinitions.
319      * 
320      * @return List
321      */
322     public java.util.List<BuildDefinition> getBuildDefinitions()
323     {
324         if ( this.buildDefinitions == null )
325         {
326             this.buildDefinitions = new java.util.ArrayList<BuildDefinition>();
327         }
328 
329         return this.buildDefinitions;
330     } //-- java.util.List<BuildDefinition> getBuildDefinitions()
331 
332     /**
333      * Get the buildNumber field.
334      * 
335      * @return int
336      */
337     public int getBuildNumber()
338     {
339         return this.buildNumber;
340     } //-- int getBuildNumber()
341 
342     /**
343      * Method getBuildResults.
344      * 
345      * @return List
346      */
347     public java.util.List<BuildResult> getBuildResults()
348     {
349         if ( this.buildResults == null )
350         {
351             this.buildResults = new java.util.ArrayList<BuildResult>();
352         }
353 
354         return this.buildResults;
355     } //-- java.util.List<BuildResult> getBuildResults()
356 
357     /**
358      * Get the checkoutResult field.
359      * 
360      * @return ScmResult
361      */
362     public ScmResult getCheckoutResult()
363     {
364         return this.checkoutResult;
365     } //-- ScmResult getCheckoutResult()
366 
367     /**
368      * Method getDependencies.
369      * 
370      * @return List
371      */
372     public java.util.List<ProjectDependency> getDependencies()
373     {
374         if ( this.dependencies == null )
375         {
376             this.dependencies = new java.util.ArrayList<ProjectDependency>();
377         }
378 
379         return this.dependencies;
380     } //-- java.util.List<ProjectDependency> getDependencies()
381 
382     /**
383      * Get the description field.
384      * 
385      * @return String
386      */
387     public String getDescription()
388     {
389         return this.description;
390     } //-- String getDescription()
391 
392     /**
393      * Method getDevelopers.
394      * 
395      * @return List
396      */
397     public java.util.List<ProjectDeveloper> getDevelopers()
398     {
399         if ( this.developers == null )
400         {
401             this.developers = new java.util.ArrayList<ProjectDeveloper>();
402         }
403 
404         return this.developers;
405     } //-- java.util.List<ProjectDeveloper> getDevelopers()
406 
407     /**
408      * Get the executorId field.
409      * 
410      * @return String
411      */
412     public String getExecutorId()
413     {
414         return this.executorId;
415     } //-- String getExecutorId()
416 
417     /**
418      * Get the groupId field.
419      * 
420      * @return String
421      */
422     public String getGroupId()
423     {
424         return this.groupId;
425     } //-- String getGroupId()
426 
427     /**
428      * Get the id field.
429      * 
430      * @return int
431      */
432     public int getId()
433     {
434         return this.id;
435     } //-- int getId()
436 
437     /**
438      * Get the latestBuildId field.
439      * 
440      * @return int
441      */
442     public int getLatestBuildId()
443     {
444         return this.latestBuildId;
445     } //-- int getLatestBuildId()
446 
447     /**
448      * Get the name field.
449      * 
450      * @return String
451      */
452     public String getName()
453     {
454         return this.name;
455     } //-- String getName()
456 
457     /**
458      * Method getNotifiers.
459      * 
460      * @return List
461      */
462     public java.util.List<ProjectNotifier> getNotifiers()
463     {
464         if ( this.notifiers == null )
465         {
466             this.notifiers = new java.util.ArrayList<ProjectNotifier>();
467         }
468 
469         return this.notifiers;
470     } //-- java.util.List<ProjectNotifier> getNotifiers()
471 
472     /**
473      * Get the oldState field.
474      * 
475      * @return int
476      */
477     public int getOldState()
478     {
479         return this.oldState;
480     } //-- int getOldState()
481 
482     /**
483      * Get the parent field.
484      * 
485      * @return ProjectDependency
486      */
487     public ProjectDependency getParent()
488     {
489         return this.parent;
490     } //-- ProjectDependency getParent()
491 
492     /**
493      * Get the projectGroup field.
494      * 
495      * @return ProjectGroup
496      */
497     public ProjectGroup getProjectGroup()
498     {
499         return this.projectGroup;
500     } //-- ProjectGroup getProjectGroup()
501 
502     /**
503      * Get the scmPassword field.
504      * 
505      * @return String
506      */
507     public String getScmPassword()
508     {
509         return this.scmPassword;
510     } //-- String getScmPassword()
511 
512     /**
513      * Get the scmTag field.
514      * 
515      * @return String
516      */
517     public String getScmTag()
518     {
519         return this.scmTag;
520     } //-- String getScmTag()
521 
522     /**
523      * Get the scmUrl field.
524      * 
525      * @return String
526      */
527     public String getScmUrl()
528     {
529         return this.scmUrl;
530     } //-- String getScmUrl()
531 
532     /**
533      * Get the scmUsername field.
534      * 
535      * @return String
536      */
537     public String getScmUsername()
538     {
539         return this.scmUsername;
540     } //-- String getScmUsername()
541 
542     /**
543      * Get the state field.
544      * 
545      * @return int
546      */
547     public int getState()
548     {
549         return this.state;
550     } //-- int getState()
551 
552     /**
553      * Get the url field.
554      * 
555      * @return String
556      */
557     public String getUrl()
558     {
559         return this.url;
560     } //-- String getUrl()
561 
562     /**
563      * Get the version field.
564      * 
565      * @return String
566      */
567     public String getVersion()
568     {
569         return this.version;
570     } //-- String getVersion()
571 
572     /**
573      * Get the workingDirectory field.
574      * 
575      * @return String
576      */
577     public String getWorkingDirectory()
578     {
579         return this.workingDirectory;
580     } //-- String getWorkingDirectory()
581 
582     /**
583      * Method hashCode.
584      * 
585      * @return int
586      */
587     public int hashCode()
588     {
589         int result = 17;
590 
591         result = 37 * result + (int) id;
592 
593         return result;
594     } //-- int hashCode()
595 
596     /**
597      * Method removeBuildDefinition.
598      * 
599      * @param buildDefinition
600      */
601     public void removeBuildDefinition( BuildDefinition buildDefinition )
602     {
603         getBuildDefinitions().remove( buildDefinition );
604     } //-- void removeBuildDefinition( BuildDefinition )
605 
606     /**
607      * Method removeBuildResult.
608      * 
609      * @param buildResult
610      */
611     public void removeBuildResult( BuildResult buildResult )
612     {
613         buildResult.breakProjectAssociation( this );
614         getBuildResults().remove( buildResult );
615     } //-- void removeBuildResult( BuildResult )
616 
617     /**
618      * Method removeDependency.
619      * 
620      * @param projectDependency
621      */
622     public void removeDependency( ProjectDependency projectDependency )
623     {
624         getDependencies().remove( projectDependency );
625     } //-- void removeDependency( ProjectDependency )
626 
627     /**
628      * Method removeDeveloper.
629      * 
630      * @param projectDeveloper
631      */
632     public void removeDeveloper( ProjectDeveloper projectDeveloper )
633     {
634         getDevelopers().remove( projectDeveloper );
635     } //-- void removeDeveloper( ProjectDeveloper )
636 
637     /**
638      * Method removeNotifier.
639      * 
640      * @param projectNotifier
641      */
642     public void removeNotifier( ProjectNotifier projectNotifier )
643     {
644         getNotifiers().remove( projectNotifier );
645     } //-- void removeNotifier( ProjectNotifier )
646 
647     /**
648      * Set the artifactId field.
649      * 
650      * @param artifactId
651      */
652     public void setArtifactId( String artifactId )
653     {
654         this.artifactId = artifactId;
655     } //-- void setArtifactId( String )
656 
657     /**
658      * Set the buildDefinitions field.
659      * 
660      * @param buildDefinitions
661      */
662     public void setBuildDefinitions( java.util.List<BuildDefinition> buildDefinitions )
663     {
664         this.buildDefinitions = buildDefinitions;
665     } //-- void setBuildDefinitions( java.util.List )
666 
667     /**
668      * Set the buildNumber field.
669      * 
670      * @param buildNumber
671      */
672     public void setBuildNumber( int buildNumber )
673     {
674         this.buildNumber = buildNumber;
675     } //-- void setBuildNumber( int )
676 
677     /**
678      * Set the buildResults field.
679      * 
680      * @param buildResults
681      */
682     public void setBuildResults( java.util.List<BuildResult> buildResults )
683     {
684         this.buildResults = buildResults;
685     } //-- void setBuildResults( java.util.List )
686 
687     /**
688      * Set the checkoutResult field.
689      * 
690      * @param checkoutResult
691      */
692     public void setCheckoutResult( ScmResult checkoutResult )
693     {
694         this.checkoutResult = checkoutResult;
695     } //-- void setCheckoutResult( ScmResult )
696 
697     /**
698      * Set the dependencies field.
699      * 
700      * @param dependencies
701      */
702     public void setDependencies( java.util.List<ProjectDependency> dependencies )
703     {
704         this.dependencies = dependencies;
705     } //-- void setDependencies( java.util.List )
706 
707     /**
708      * Set the description field.
709      * 
710      * @param description
711      */
712     public void setDescription( String description )
713     {
714         this.description = description;
715     } //-- void setDescription( String )
716 
717     /**
718      * Set the developers field.
719      * 
720      * @param developers
721      */
722     public void setDevelopers( java.util.List<ProjectDeveloper> developers )
723     {
724         this.developers = developers;
725     } //-- void setDevelopers( java.util.List )
726 
727     /**
728      * Set the executorId field.
729      * 
730      * @param executorId
731      */
732     public void setExecutorId( String executorId )
733     {
734         this.executorId = executorId;
735     } //-- void setExecutorId( String )
736 
737     /**
738      * Set the groupId field.
739      * 
740      * @param groupId
741      */
742     public void setGroupId( String groupId )
743     {
744         this.groupId = groupId;
745     } //-- void setGroupId( String )
746 
747     /**
748      * Set the id field.
749      * 
750      * @param id
751      */
752     public void setId( int id )
753     {
754         this.id = id;
755     } //-- void setId( int )
756 
757     /**
758      * Set the latestBuildId field.
759      * 
760      * @param latestBuildId
761      */
762     public void setLatestBuildId( int latestBuildId )
763     {
764         this.latestBuildId = latestBuildId;
765     } //-- void setLatestBuildId( int )
766 
767     /**
768      * Set the name field.
769      * 
770      * @param name
771      */
772     public void setName( String name )
773     {
774         this.name = name;
775     } //-- void setName( String )
776 
777     /**
778      * Set the notifiers field.
779      * 
780      * @param notifiers
781      */
782     public void setNotifiers( java.util.List<ProjectNotifier> notifiers )
783     {
784         this.notifiers = notifiers;
785     } //-- void setNotifiers( java.util.List )
786 
787     /**
788      * Set the oldState field.
789      * 
790      * @param oldState
791      */
792     public void setOldState( int oldState )
793     {
794         this.oldState = oldState;
795     } //-- void setOldState( int )
796 
797     /**
798      * Set the parent field.
799      * 
800      * @param parent
801      */
802     public void setParent( ProjectDependency parent )
803     {
804         this.parent = parent;
805     } //-- void setParent( ProjectDependency )
806 
807     /**
808      * Set the projectGroup field.
809      * 
810      * @param projectGroup
811      */
812     public void setProjectGroup( ProjectGroup projectGroup )
813     {
814         if ( this.projectGroup != null )
815         {
816             this.projectGroup.breakProjectAssociation( this );
817         }
818 
819         this.projectGroup = projectGroup;
820 
821         if ( projectGroup != null )
822         {
823             this.projectGroup.createProjectAssociation( this );
824         }
825     } //-- void setProjectGroup( ProjectGroup )
826 
827     /**
828      * Set the scmPassword field.
829      * 
830      * @param scmPassword
831      */
832     public void setScmPassword( String scmPassword )
833     {
834         this.scmPassword = scmPassword;
835     } //-- void setScmPassword( String )
836 
837     /**
838      * Set the scmTag field.
839      * 
840      * @param scmTag
841      */
842     public void setScmTag( String scmTag )
843     {
844         this.scmTag = scmTag;
845     } //-- void setScmTag( String )
846 
847     /**
848      * Set the scmUrl field.
849      * 
850      * @param scmUrl
851      */
852     public void setScmUrl( String scmUrl )
853     {
854         this.scmUrl = scmUrl;
855     } //-- void setScmUrl( String )
856 
857     /**
858      * Set the scmUsername field.
859      * 
860      * @param scmUsername
861      */
862     public void setScmUsername( String scmUsername )
863     {
864         this.scmUsername = scmUsername;
865     } //-- void setScmUsername( String )
866 
867     /**
868      * Set the state field.
869      * 
870      * @param state
871      */
872     public void setState( int state )
873     {
874         this.state = state;
875     } //-- void setState( int )
876 
877     /**
878      * Set the url field.
879      * 
880      * @param url
881      */
882     public void setUrl( String url )
883     {
884         this.url = url;
885     } //-- void setUrl( String )
886 
887     /**
888      * Set the version field.
889      * 
890      * @param version
891      */
892     public void setVersion( String version )
893     {
894         this.version = version;
895     } //-- void setVersion( String )
896 
897     /**
898      * Set the workingDirectory field.
899      * 
900      * @param workingDirectory
901      */
902     public void setWorkingDirectory( String workingDirectory )
903     {
904         this.workingDirectory = workingDirectory;
905     } //-- void setWorkingDirectory( String )
906 
907     /**
908      * Method toString.
909      * 
910      * @return String
911      */
912     public java.lang.String toString()
913     {
914         StringBuilder buf = new StringBuilder( 128 );
915 
916         buf.append( "id = '" );
917         buf.append( getId() );
918         buf.append( "'" );
919 
920         return buf.toString();
921     } //-- java.lang.String toString()
922 
923 }