View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.9.2-SNAPSHOT,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.codehaus.modello.test.features;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.codehaus.modello.test.features.other.PackageNameFeature;
15  import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
16  
17  /**
18   * A simple class for association demo.
19   * 
20   * @version $Revision$ $Date$
21   */
22  @SuppressWarnings( "all" )
23  public class Reference
24      implements java.io.Serializable
25  {
26  
27        //--------------------------/
28       //- Class/Member Variables -/
29      //--------------------------/
30  
31      /**
32       * Field id.
33       */
34      private String id;
35  
36  
37        //-----------/
38       //- Methods -/
39      //-----------/
40  
41      /**
42       * Method equals.
43       * 
44       * @param other
45       * @return boolean
46       */
47      public boolean equals( Object other )
48      {
49          if ( this == other )
50          {
51              return true;
52          }
53  
54          if ( !( other instanceof Reference ) )
55          {
56              return false;
57          }
58  
59          Reference that = (Reference) other;
60          boolean result = true;
61  
62          result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
63  
64          return result;
65      } //-- boolean equals( Object )
66  
67      /**
68       * Get the id field.
69       * 
70       * @return String
71       */
72      public String getId()
73      {
74          return this.id;
75      } //-- String getId()
76  
77      /**
78       * Method hashCode.
79       * 
80       * @return int
81       */
82      public int hashCode()
83      {
84          int result = 17;
85  
86          result = 37 * result + ( id != null ? id.hashCode() : 0 );
87  
88          return result;
89      } //-- int hashCode()
90  
91      /**
92       * Set the id field.
93       * 
94       * @param id
95       */
96      public void setId( String id )
97      {
98          this.id = id;
99      } //-- void setId( String )
100 
101     /**
102      * Method toString.
103      * 
104      * @return String
105      */
106     public java.lang.String toString()
107     {
108         StringBuilder buf = new StringBuilder( 128 );
109 
110         buf.append( "id = '" );
111         buf.append( getId() );
112         buf.append( "'" );
113 
114         return buf.toString();
115     } //-- java.lang.String toString()
116 
117 }