001/*
002 =================== DO NOT EDIT THIS FILE ====================
003 Generated by Modello 1.9.2-SNAPSHOT,
004 any modifications will be overwritten.
005 ==============================================================
006 */
007
008package org.codehaus.modello.test.features;
009
010  //---------------------------------/
011 //- Imported classes and packages -/
012//---------------------------------/
013
014import org.codehaus.modello.test.features.other.PackageNameFeature;
015import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
016
017/**
018 * Class Features.
019 * 
020 * @version $Revision$ $Date$
021 */
022@SuppressWarnings( "all" )
023public class Features
024    implements java.io.Serializable
025{
026
027      //--------------------------/
028     //- Class/Member Variables -/
029    //--------------------------/
030
031    /**
032     * A field described as model's versionDefinition field: its
033     * value contains the version of the model used.
034     */
035    private String versionField = "1.0.0";
036
037    /**
038     * Field comment.
039     */
040    private String comment;
041
042    /**
043     * Test of a description.
044     */
045    private String description;
046
047    /**
048     * <field><required>true</required></field>:
049     * Test of a required field.
050     */
051    private String required;
052
053    /**
054     * <field><identifier>true</identifier></field>:
055     * a field taking part in instance identifier.
056     *             This field is used to generate
057     * <code>toString()</code>, <code>hashCode()</code> and
058     * <code>equals()</code>
059     *             methods.
060     */
061    private String identifier;
062
063    /**
064     * Multiple fields can be participate in an identifier, either
065     * simple types or complex ones.
066     */
067    private Reference identifierPart2;
068
069    /**
070     * Field simpleTypes.
071     */
072    private SimpleTypes simpleTypes;
073
074    /**
075     * Field defaultValues.
076     */
077    private SimpleTypes defaultValues;
078
079    /**
080     * Field arrays.
081     */
082    private ArrayFeatures arrays;
083
084    /**
085     * Test of association features.
086     */
087    private AssociationFeatures associationFeatures;
088
089    /**
090     * Field javaFeatures.
091     */
092    private JavaFeatures javaFeatures;
093
094    /**
095     * Field xmlFeatures.
096     */
097    private XmlFeatures xmlFeatures;
098
099    /**
100     * Field xdocFeatures.
101     */
102    private XdocFeatures xdocFeatures;
103
104    /**
105     * Field node.
106     */
107    private NodeItem node;
108
109    /**
110     * Field cloneable.
111     */
112    private Thing cloneable;
113
114    /**
115     * Field file.
116     */
117    private File file;
118
119    /**
120     * Field action.
121     */
122    private Action action;
123
124    /**
125     * Field modelEncoding.
126     */
127    private String modelEncoding = "UTF-8";
128
129
130      //-----------/
131     //- Methods -/
132    //-----------/
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 Features ) )
148        {
149            return false;
150        }
151
152        Features that = (Features) other;
153        boolean result = true;
154
155        result = result && ( getIdentifier() == null ? that.getIdentifier() == null : getIdentifier().equals( that.getIdentifier() ) );
156        result = result && ( getIdentifierPart2() == null ? that.getIdentifierPart2() == null : getIdentifierPart2().equals( that.getIdentifierPart2() ) );
157
158        return result;
159    } //-- boolean equals( Object )
160
161    /**
162     * Get the action field.
163     * 
164     * @return Action
165     */
166    public Action getAction()
167    {
168        return this.action;
169    } //-- Action getAction()
170
171    /**
172     * Get the arrays field.
173     * 
174     * @return ArrayFeatures
175     */
176    public ArrayFeatures getArrays()
177    {
178        return this.arrays;
179    } //-- ArrayFeatures getArrays()
180
181    /**
182     * Get test of association features.
183     * 
184     * @return AssociationFeatures
185     */
186    public AssociationFeatures getAssociationFeatures()
187    {
188        return this.associationFeatures;
189    } //-- AssociationFeatures getAssociationFeatures()
190
191    /**
192     * Get the cloneable field.
193     * 
194     * @return Thing
195     */
196    public Thing getCloneable()
197    {
198        return this.cloneable;
199    } //-- Thing getCloneable()
200
201    /**
202     * Get the comment field.
203     * 
204     * @return String
205     */
206    public String getComment()
207    {
208        return this.comment;
209    } //-- String getComment()
210
211    /**
212     * Get the defaultValues field.
213     * 
214     * @return SimpleTypes
215     */
216    public SimpleTypes getDefaultValues()
217    {
218        return this.defaultValues;
219    } //-- SimpleTypes getDefaultValues()
220
221    /**
222     * Get test of a description.
223     * 
224     * @return String
225     */
226    public String getDescription()
227    {
228        return this.description;
229    } //-- String getDescription()
230
231    /**
232     * Get the file field.
233     * 
234     * @return File
235     */
236    public File getFile()
237    {
238        return this.file;
239    } //-- File getFile()
240
241    /**
242     * Get
243     * &lt;field&gt;&lt;identifier&gt;true&lt;/identifier&gt;&lt;/field&gt;:
244     * a field taking part in instance identifier.
245     *             This field is used to generate
246     * <code>toString()</code>, <code>hashCode()</code> and
247     * <code>equals()</code>
248     *             methods.
249     * 
250     * @return String
251     */
252    public String getIdentifier()
253    {
254        return this.identifier;
255    } //-- String getIdentifier()
256
257    /**
258     * Get multiple fields can be participate in an identifier,
259     * either simple types or complex ones.
260     * 
261     * @return Reference
262     */
263    public Reference getIdentifierPart2()
264    {
265        return this.identifierPart2;
266    } //-- Reference getIdentifierPart2()
267
268    /**
269     * Get the javaFeatures field.
270     * 
271     * @return JavaFeatures
272     */
273    public JavaFeatures getJavaFeatures()
274    {
275        return this.javaFeatures;
276    } //-- JavaFeatures getJavaFeatures()
277
278    /**
279     * Get the modelEncoding field.
280     * 
281     * @return String
282     */
283    public String getModelEncoding()
284    {
285        return this.modelEncoding;
286    } //-- String getModelEncoding()
287
288    /**
289     * Get the node field.
290     * 
291     * @return NodeItem
292     */
293    public NodeItem getNode()
294    {
295        return this.node;
296    } //-- NodeItem getNode()
297
298    /**
299     * Get
300     * &lt;field&gt;&lt;required&gt;true&lt;/required&gt;&lt;/field&gt;:
301     * Test of a required field.
302     * 
303     * @return String
304     */
305    public String getRequired()
306    {
307        return this.required;
308    } //-- String getRequired()
309
310    /**
311     * Get the simpleTypes field.
312     * 
313     * @return SimpleTypes
314     */
315    public SimpleTypes getSimpleTypes()
316    {
317        return this.simpleTypes;
318    } //-- SimpleTypes getSimpleTypes()
319
320    /**
321     * Get a field described as model's versionDefinition field:
322     * its value contains the version of the model used.
323     * 
324     * @return String
325     */
326    public String getVersionField()
327    {
328        return this.versionField;
329    } //-- String getVersionField()
330
331    /**
332     * Get the xdocFeatures field.
333     * 
334     * @return XdocFeatures
335     */
336    public XdocFeatures getXdocFeatures()
337    {
338        return this.xdocFeatures;
339    } //-- XdocFeatures getXdocFeatures()
340
341    /**
342     * Get the xmlFeatures field.
343     * 
344     * @return XmlFeatures
345     */
346    public XmlFeatures getXmlFeatures()
347    {
348        return this.xmlFeatures;
349    } //-- XmlFeatures getXmlFeatures()
350
351    /**
352     * Method hashCode.
353     * 
354     * @return int
355     */
356    public int hashCode()
357    {
358        int result = 17;
359
360        result = 37 * result + ( identifier != null ? identifier.hashCode() : 0 );
361        result = 37 * result + ( identifierPart2 != null ? identifierPart2.hashCode() : 0 );
362
363        return result;
364    } //-- int hashCode()
365
366    /**
367     * Set the action field.
368     * 
369     * @param action
370     */
371    public void setAction( Action action )
372    {
373        this.action = action;
374    } //-- void setAction( Action )
375
376    /**
377     * Set the arrays field.
378     * 
379     * @param arrays
380     */
381    public void setArrays( ArrayFeatures arrays )
382    {
383        this.arrays = arrays;
384    } //-- void setArrays( ArrayFeatures )
385
386    /**
387     * Set test of association features.
388     * 
389     * @param associationFeatures
390     */
391    public void setAssociationFeatures( AssociationFeatures associationFeatures )
392    {
393        this.associationFeatures = associationFeatures;
394    } //-- void setAssociationFeatures( AssociationFeatures )
395
396    /**
397     * Set the cloneable field.
398     * 
399     * @param cloneable
400     */
401    public void setCloneable( Thing cloneable )
402    {
403        this.cloneable = cloneable;
404    } //-- void setCloneable( Thing )
405
406    /**
407     * Set the comment field.
408     * 
409     * @param comment
410     */
411    public void setComment( String comment )
412    {
413        this.comment = comment;
414    } //-- void setComment( String )
415
416    /**
417     * Set the defaultValues field.
418     * 
419     * @param defaultValues
420     */
421    public void setDefaultValues( SimpleTypes defaultValues )
422    {
423        this.defaultValues = defaultValues;
424    } //-- void setDefaultValues( SimpleTypes )
425
426    /**
427     * Set test of a description.
428     * 
429     * @param description
430     */
431    public void setDescription( String description )
432    {
433        this.description = description;
434    } //-- void setDescription( String )
435
436    /**
437     * Set the file field.
438     * 
439     * @param file
440     */
441    public void setFile( File file )
442    {
443        this.file = file;
444    } //-- void setFile( File )
445
446    /**
447     * Set
448     * &lt;field&gt;&lt;identifier&gt;true&lt;/identifier&gt;&lt;/field&gt;:
449     * a field taking part in instance identifier.
450     *             This field is used to generate
451     * <code>toString()</code>, <code>hashCode()</code> and
452     * <code>equals()</code>
453     *             methods.
454     * 
455     * @param identifier
456     */
457    public void setIdentifier( String identifier )
458    {
459        this.identifier = identifier;
460    } //-- void setIdentifier( String )
461
462    /**
463     * Set multiple fields can be participate in an identifier,
464     * either simple types or complex ones.
465     * 
466     * @param identifierPart2
467     */
468    public void setIdentifierPart2( Reference identifierPart2 )
469    {
470        this.identifierPart2 = identifierPart2;
471    } //-- void setIdentifierPart2( Reference )
472
473    /**
474     * Set the javaFeatures field.
475     * 
476     * @param javaFeatures
477     */
478    public void setJavaFeatures( JavaFeatures javaFeatures )
479    {
480        this.javaFeatures = javaFeatures;
481    } //-- void setJavaFeatures( JavaFeatures )
482
483    /**
484     * Set the modelEncoding field.
485     * 
486     * @param modelEncoding
487     */
488    public void setModelEncoding( String modelEncoding )
489    {
490        this.modelEncoding = modelEncoding;
491    } //-- void setModelEncoding( String )
492
493    /**
494     * Set the node field.
495     * 
496     * @param node
497     */
498    public void setNode( NodeItem node )
499    {
500        this.node = node;
501    } //-- void setNode( NodeItem )
502
503    /**
504     * Set
505     * &lt;field&gt;&lt;required&gt;true&lt;/required&gt;&lt;/field&gt;:
506     * Test of a required field.
507     * 
508     * @param required
509     */
510    public void setRequired( String required )
511    {
512        this.required = required;
513    } //-- void setRequired( String )
514
515    /**
516     * Set the simpleTypes field.
517     * 
518     * @param simpleTypes
519     */
520    public void setSimpleTypes( SimpleTypes simpleTypes )
521    {
522        this.simpleTypes = simpleTypes;
523    } //-- void setSimpleTypes( SimpleTypes )
524
525    /**
526     * Set a field described as model's versionDefinition field:
527     * its value contains the version of the model used.
528     * 
529     * @param versionField
530     */
531    public void setVersionField( String versionField )
532    {
533        this.versionField = versionField;
534    } //-- void setVersionField( String )
535
536    /**
537     * Set the xdocFeatures field.
538     * 
539     * @param xdocFeatures
540     */
541    public void setXdocFeatures( XdocFeatures xdocFeatures )
542    {
543        this.xdocFeatures = xdocFeatures;
544    } //-- void setXdocFeatures( XdocFeatures )
545
546    /**
547     * Set the xmlFeatures field.
548     * 
549     * @param xmlFeatures
550     */
551    public void setXmlFeatures( XmlFeatures xmlFeatures )
552    {
553        this.xmlFeatures = xmlFeatures;
554    } //-- void setXmlFeatures( XmlFeatures )
555
556    /**
557     * Method toString.
558     * 
559     * @return String
560     */
561    public java.lang.String toString()
562    {
563        StringBuilder buf = new StringBuilder( 128 );
564
565        buf.append( "identifier = '" );
566        buf.append( getIdentifier() );
567        buf.append( "'" );
568        buf.append( "\n" ); 
569        buf.append( "identifierPart2 = '" );
570        buf.append( getIdentifierPart2() );
571        buf.append( "'" );
572
573        return buf.toString();
574    } //-- java.lang.String toString()
575
576    
577            /* this text goes directly into generated code */
578          
579    
580            public final static String CODE_SEGMENT = "freedom with codeSegment";
581          
582}