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   * 
32   *         Schedule for a project.
33   *       
34   * 
35   * @version $Revision$ $Date$
36   */
37  @SuppressWarnings( "all" )
38  public class Schedule
39      implements java.io.Serializable
40  {
41  
42        //--------------------------/
43       //- Class/Member Variables -/
44      //--------------------------/
45  
46      /**
47       * Field id.
48       */
49      private int id = 0;
50  
51      /**
52       * Field active.
53       */
54      private boolean active = false;
55  
56      /**
57       * Field name.
58       */
59      private String name;
60  
61      /**
62       * Field description.
63       */
64      private String description;
65  
66      /**
67       * 
68       *             Delay in seconds.
69       *           
70       */
71      private int delay = 0;
72  
73      /**
74       * 
75       *             Maximum execution time of a job in seconds
76       * before it's
77       *             terminated.
78       *           
79       */
80      private int maxJobExecutionTime = 3600;
81  
82      /**
83       * Field cronExpression.
84       */
85      private String cronExpression;
86  
87      /**
88       * Field buildQueues.
89       */
90      private java.util.List<BuildQueue> buildQueues;
91  
92  
93        //-----------/
94       //- Methods -/
95      //-----------/
96  
97      /**
98       * Method addBuildQueue.
99       * 
100      * @param buildQueue
101      */
102     public void addBuildQueue( BuildQueue buildQueue )
103     {
104         getBuildQueues().add( buildQueue );
105     } //-- void addBuildQueue( BuildQueue )
106 
107     /**
108      * Method equals.
109      * 
110      * @param other
111      * @return boolean
112      */
113     public boolean equals( Object other )
114     {
115         if ( this == other )
116         {
117             return true;
118         }
119 
120         if ( !( other instanceof Schedule ) )
121         {
122             return false;
123         }
124 
125         Schedule that = (Schedule) other;
126         boolean result = true;
127 
128         result = result && id == that.id;
129 
130         return result;
131     } //-- boolean equals( Object )
132 
133     /**
134      * Method getBuildQueues.
135      * 
136      * @return List
137      */
138     public java.util.List<BuildQueue> getBuildQueues()
139     {
140         if ( this.buildQueues == null )
141         {
142             this.buildQueues = new java.util.ArrayList<BuildQueue>();
143         }
144 
145         return this.buildQueues;
146     } //-- java.util.List<BuildQueue> getBuildQueues()
147 
148     /**
149      * Get the cronExpression field.
150      * 
151      * @return String
152      */
153     public String getCronExpression()
154     {
155         return this.cronExpression;
156     } //-- String getCronExpression()
157 
158     /**
159      * Get delay in seconds.
160      * 
161      * @return int
162      */
163     public int getDelay()
164     {
165         return this.delay;
166     } //-- int getDelay()
167 
168     /**
169      * Get the description field.
170      * 
171      * @return String
172      */
173     public String getDescription()
174     {
175         return this.description;
176     } //-- String getDescription()
177 
178     /**
179      * Get the id field.
180      * 
181      * @return int
182      */
183     public int getId()
184     {
185         return this.id;
186     } //-- int getId()
187 
188     /**
189      * Get maximum execution time of a job in seconds before it's
190      *             terminated.
191      * 
192      * @return int
193      */
194     public int getMaxJobExecutionTime()
195     {
196         return this.maxJobExecutionTime;
197     } //-- int getMaxJobExecutionTime()
198 
199     /**
200      * Get the name field.
201      * 
202      * @return String
203      */
204     public String getName()
205     {
206         return this.name;
207     } //-- String getName()
208 
209     /**
210      * Method hashCode.
211      * 
212      * @return int
213      */
214     public int hashCode()
215     {
216         int result = 17;
217 
218         result = 37 * result + (int) id;
219 
220         return result;
221     } //-- int hashCode()
222 
223     /**
224      * Get the active field.
225      * 
226      * @return boolean
227      */
228     public boolean isActive()
229     {
230         return this.active;
231     } //-- boolean isActive()
232 
233     /**
234      * Method removeBuildQueue.
235      * 
236      * @param buildQueue
237      */
238     public void removeBuildQueue( BuildQueue buildQueue )
239     {
240         getBuildQueues().remove( buildQueue );
241     } //-- void removeBuildQueue( BuildQueue )
242 
243     /**
244      * Set the active field.
245      * 
246      * @param active
247      */
248     public void setActive( boolean active )
249     {
250         this.active = active;
251     } //-- void setActive( boolean )
252 
253     /**
254      * Set the buildQueues field.
255      * 
256      * @param buildQueues
257      */
258     public void setBuildQueues( java.util.List<BuildQueue> buildQueues )
259     {
260         this.buildQueues = buildQueues;
261     } //-- void setBuildQueues( java.util.List )
262 
263     /**
264      * Set the cronExpression field.
265      * 
266      * @param cronExpression
267      */
268     public void setCronExpression( String cronExpression )
269     {
270         this.cronExpression = cronExpression;
271     } //-- void setCronExpression( String )
272 
273     /**
274      * Set delay in seconds.
275      * 
276      * @param delay
277      */
278     public void setDelay( int delay )
279     {
280         this.delay = delay;
281     } //-- void setDelay( int )
282 
283     /**
284      * Set the description field.
285      * 
286      * @param description
287      */
288     public void setDescription( String description )
289     {
290         this.description = description;
291     } //-- void setDescription( String )
292 
293     /**
294      * Set the id field.
295      * 
296      * @param id
297      */
298     public void setId( int id )
299     {
300         this.id = id;
301     } //-- void setId( int )
302 
303     /**
304      * Set maximum execution time of a job in seconds before it's
305      *             terminated.
306      * 
307      * @param maxJobExecutionTime
308      */
309     public void setMaxJobExecutionTime( int maxJobExecutionTime )
310     {
311         this.maxJobExecutionTime = maxJobExecutionTime;
312     } //-- void setMaxJobExecutionTime( int )
313 
314     /**
315      * Set the name field.
316      * 
317      * @param name
318      */
319     public void setName( String name )
320     {
321         this.name = name;
322     } //-- void setName( String )
323 
324     /**
325      * Method toString.
326      * 
327      * @return String
328      */
329     public java.lang.String toString()
330     {
331         StringBuilder buf = new StringBuilder( 128 );
332 
333         buf.append( "id = '" );
334         buf.append( getId() );
335         buf.append( "'" );
336 
337         return buf.toString();
338     } //-- java.lang.String toString()
339 
340 }