001/*
002 =================== DO NOT EDIT THIS FILE ====================
003 Generated by Modello 1.9.0-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>: Test of a required
049     * field.
050     */
051    private String required;
052
053    /**
054     * <field><identifier>true</identifier></field>: a field taking
055     * 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 <field><identifier>true</identifier></field>: a field
243     * taking part in instance identifier.
244     *             This field is used to generate
245     * <code>toString()</code>, <code>hashCode()</code> and
246     * <code>equals()</code>
247     *             methods.
248     * 
249     * @return String
250     */
251    public String getIdentifier()
252    {
253        return this.identifier;
254    } //-- String getIdentifier()
255
256    /**
257     * Get multiple fields can be participate in an identifier,
258     * either simple types or complex ones.
259     * 
260     * @return Reference
261     */
262    public Reference getIdentifierPart2()
263    {
264        return this.identifierPart2;
265    } //-- Reference getIdentifierPart2()
266
267    /**
268     * Get the javaFeatures field.
269     * 
270     * @return JavaFeatures
271     */
272    public JavaFeatures getJavaFeatures()
273    {
274        return this.javaFeatures;
275    } //-- JavaFeatures getJavaFeatures()
276
277    /**
278     * Get the modelEncoding field.
279     * 
280     * @return String
281     */
282    public String getModelEncoding()
283    {
284        return this.modelEncoding;
285    } //-- String getModelEncoding()
286
287    /**
288     * Get the node field.
289     * 
290     * @return NodeItem
291     */
292    public NodeItem getNode()
293    {
294        return this.node;
295    } //-- NodeItem getNode()
296
297    /**
298     * Get <field><required>true</required></field>: Test of a
299     * required field.
300     * 
301     * @return String
302     */
303    public String getRequired()
304    {
305        return this.required;
306    } //-- String getRequired()
307
308    /**
309     * Get the simpleTypes field.
310     * 
311     * @return SimpleTypes
312     */
313    public SimpleTypes getSimpleTypes()
314    {
315        return this.simpleTypes;
316    } //-- SimpleTypes getSimpleTypes()
317
318    /**
319     * Get a field described as model's versionDefinition field:
320     * its value contains the version of the model used.
321     * 
322     * @return String
323     */
324    public String getVersionField()
325    {
326        return this.versionField;
327    } //-- String getVersionField()
328
329    /**
330     * Get the xdocFeatures field.
331     * 
332     * @return XdocFeatures
333     */
334    public XdocFeatures getXdocFeatures()
335    {
336        return this.xdocFeatures;
337    } //-- XdocFeatures getXdocFeatures()
338
339    /**
340     * Get the xmlFeatures field.
341     * 
342     * @return XmlFeatures
343     */
344    public XmlFeatures getXmlFeatures()
345    {
346        return this.xmlFeatures;
347    } //-- XmlFeatures getXmlFeatures()
348
349    /**
350     * Method hashCode.
351     * 
352     * @return int
353     */
354    public int hashCode()
355    {
356        int result = 17;
357
358        result = 37 * result + ( identifier != null ? identifier.hashCode() : 0 );
359        result = 37 * result + ( identifierPart2 != null ? identifierPart2.hashCode() : 0 );
360
361        return result;
362    } //-- int hashCode()
363
364    /**
365     * Set the action field.
366     * 
367     * @param action
368     */
369    public void setAction( Action action )
370    {
371        this.action = action;
372    } //-- void setAction( Action )
373
374    /**
375     * Set the arrays field.
376     * 
377     * @param arrays
378     */
379    public void setArrays( ArrayFeatures arrays )
380    {
381        this.arrays = arrays;
382    } //-- void setArrays( ArrayFeatures )
383
384    /**
385     * Set test of association features.
386     * 
387     * @param associationFeatures
388     */
389    public void setAssociationFeatures( AssociationFeatures associationFeatures )
390    {
391        this.associationFeatures = associationFeatures;
392    } //-- void setAssociationFeatures( AssociationFeatures )
393
394    /**
395     * Set the cloneable field.
396     * 
397     * @param cloneable
398     */
399    public void setCloneable( Thing cloneable )
400    {
401        this.cloneable = cloneable;
402    } //-- void setCloneable( Thing )
403
404    /**
405     * Set the comment field.
406     * 
407     * @param comment
408     */
409    public void setComment( String comment )
410    {
411        this.comment = comment;
412    } //-- void setComment( String )
413
414    /**
415     * Set the defaultValues field.
416     * 
417     * @param defaultValues
418     */
419    public void setDefaultValues( SimpleTypes defaultValues )
420    {
421        this.defaultValues = defaultValues;
422    } //-- void setDefaultValues( SimpleTypes )
423
424    /**
425     * Set test of a description.
426     * 
427     * @param description
428     */
429    public void setDescription( String description )
430    {
431        this.description = description;
432    } //-- void setDescription( String )
433
434    /**
435     * Set the file field.
436     * 
437     * @param file
438     */
439    public void setFile( File file )
440    {
441        this.file = file;
442    } //-- void setFile( File )
443
444    /**
445     * Set <field><identifier>true</identifier></field>: a field
446     * taking part in instance identifier.
447     *             This field is used to generate
448     * <code>toString()</code>, <code>hashCode()</code> and
449     * <code>equals()</code>
450     *             methods.
451     * 
452     * @param identifier
453     */
454    public void setIdentifier( String identifier )
455    {
456        this.identifier = identifier;
457    } //-- void setIdentifier( String )
458
459    /**
460     * Set multiple fields can be participate in an identifier,
461     * either simple types or complex ones.
462     * 
463     * @param identifierPart2
464     */
465    public void setIdentifierPart2( Reference identifierPart2 )
466    {
467        this.identifierPart2 = identifierPart2;
468    } //-- void setIdentifierPart2( Reference )
469
470    /**
471     * Set the javaFeatures field.
472     * 
473     * @param javaFeatures
474     */
475    public void setJavaFeatures( JavaFeatures javaFeatures )
476    {
477        this.javaFeatures = javaFeatures;
478    } //-- void setJavaFeatures( JavaFeatures )
479
480    /**
481     * Set the modelEncoding field.
482     * 
483     * @param modelEncoding
484     */
485    public void setModelEncoding( String modelEncoding )
486    {
487        this.modelEncoding = modelEncoding;
488    } //-- void setModelEncoding( String )
489
490    /**
491     * Set the node field.
492     * 
493     * @param node
494     */
495    public void setNode( NodeItem node )
496    {
497        this.node = node;
498    } //-- void setNode( NodeItem )
499
500    /**
501     * Set <field><required>true</required></field>: Test of a
502     * required field.
503     * 
504     * @param required
505     */
506    public void setRequired( String required )
507    {
508        this.required = required;
509    } //-- void setRequired( String )
510
511    /**
512     * Set the simpleTypes field.
513     * 
514     * @param simpleTypes
515     */
516    public void setSimpleTypes( SimpleTypes simpleTypes )
517    {
518        this.simpleTypes = simpleTypes;
519    } //-- void setSimpleTypes( SimpleTypes )
520
521    /**
522     * Set a field described as model's versionDefinition field:
523     * its value contains the version of the model used.
524     * 
525     * @param versionField
526     */
527    public void setVersionField( String versionField )
528    {
529        this.versionField = versionField;
530    } //-- void setVersionField( String )
531
532    /**
533     * Set the xdocFeatures field.
534     * 
535     * @param xdocFeatures
536     */
537    public void setXdocFeatures( XdocFeatures xdocFeatures )
538    {
539        this.xdocFeatures = xdocFeatures;
540    } //-- void setXdocFeatures( XdocFeatures )
541
542    /**
543     * Set the xmlFeatures field.
544     * 
545     * @param xmlFeatures
546     */
547    public void setXmlFeatures( XmlFeatures xmlFeatures )
548    {
549        this.xmlFeatures = xmlFeatures;
550    } //-- void setXmlFeatures( XmlFeatures )
551
552    /**
553     * Method toString.
554     * 
555     * @return String
556     */
557    public java.lang.String toString()
558    {
559        StringBuilder buf = new StringBuilder( 128 );
560
561        buf.append( "identifier = '" );
562        buf.append( getIdentifier() );
563        buf.append( "'" );
564        buf.append( "\n" ); 
565        buf.append( "identifierPart2 = '" );
566        buf.append( getIdentifierPart2() );
567        buf.append( "'" );
568
569        return buf.toString();
570    } //-- java.lang.String toString()
571
572    
573            /* this text goes directly into generated code */
574          
575    
576            public final static String CODE_SEGMENT = "freedom with codeSegment";
577          
578}