View Javadoc

1   /*
2    * Copyright (C) 2003-2012 David E. Berry
3    *
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Lesser General Public
6    * License as published by the Free Software Foundation; either
7    * version 2.1 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Lesser General Public License for more details.
13   *
14   * You should have received a copy of the GNU Lesser General Public
15   * License along with this library; if not, write to the Free Software
16   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17   *
18   * A copy of the GNU Lesser General Public License may also be found at
19   * http://www.gnu.org/licenses/lgpl.txt
20   */
21  package org.synchronoss.cpo.meta.bean;
22  
23  public class CpoAttributeBean implements java.io.Serializable {
24  
25    /*
26     * Properties
27     */
28    private java.lang.String javaName;
29    private java.lang.String javaType;
30    private java.lang.String dataName;
31    private java.lang.String dataType;
32    private java.lang.String transformClassName;
33    private java.lang.String description;
34  
35    public CpoAttributeBean() {
36    }
37  
38    public String getDataName() {
39      return dataName;
40    }
41  
42    public void setDataName(String dataName) {
43      this.dataName = dataName;
44    }
45  
46    public String getDataType() {
47      return dataType;
48    }
49  
50    public void setDataType(String dataType) {
51      this.dataType = dataType;
52    }
53  
54    public String getDescription() {
55      return description;
56    }
57  
58    public void setDescription(String description) {
59      this.description = description;
60    }
61  
62    public String getJavaName() {
63      return javaName;
64    }
65  
66    public void setJavaName(String javaName) {
67      this.javaName = javaName;
68    }
69  
70    public String getJavaType() {
71      return javaType;
72    }
73  
74    public void setJavaType(String javaType) {
75      this.javaType = javaType;
76    }
77  
78    public String getTransformClassName() {
79      return transformClassName;
80    }
81  
82    public void setTransformClassName(String transformClassName) {
83      this.transformClassName = transformClassName;
84    }
85  
86    /*
87     * Getters and Setters
88     */
89    @Override
90    public boolean equals(Object o) {
91      if (this == o) {
92        return true;
93      }
94      if (o == null || getClass() != o.getClass()) {
95        return false;
96      }
97  
98      CpoAttributeBean that = (CpoAttributeBean) o;
99  
100     if (getJavaName() != null ? !getJavaName().equals(that.getJavaName()) : that.getJavaName() != null) {
101       return false;
102     }
103     if (getJavaType() != null ? !getJavaType().equals(that.getJavaType()) : that.getJavaType() != null) {
104       return false;
105     }
106     if (getDataName() != null ? !getDataName().equals(that.getDataName()) : that.getDataName() != null) {
107       return false;
108     }
109     if (getDataType() != null ? !getDataType().equals(that.getDataType()) : that.getDataType() != null) {
110       return false;
111     }
112     if (getTransformClassName() != null ? !getTransformClassName().equals(that.getTransformClassName()) : that.getTransformClassName() != null) {
113       return false;
114     }
115     if (getDescription() != null ? !getDescription().equals(that.getDescription()) : that.getDescription() != null) {
116       return false;
117     }
118 
119     return true;
120   }
121 
122   @Override
123   public int hashCode() {
124     int result = 0;
125     result = 31 * result + getClass().getName().hashCode();
126     result = 31 * result + (getJavaName() != null ? getJavaName().hashCode() : 0);
127     result = 31 * result + (getJavaType() != null ? getJavaType().hashCode() : 0);
128     result = 31 * result + (getDataName() != null ? getDataName().hashCode() : 0);
129     result = 31 * result + (getDataType() != null ? getDataType().hashCode() : 0);
130     result = 31 * result + (getTransformClassName() != null ? getTransformClassName().hashCode() : 0);
131     result = 31 * result + (getDescription() != null ? getDescription().hashCode() : 0);
132     return result;
133   }
134 
135   @Override
136   public String toString() {
137     StringBuilder str = new StringBuilder();
138     str.append("javaName = " + getJavaName() + "\n");
139     str.append("javaType = " + getJavaType() + "\n");
140     str.append("dataName = " + getDataName() + "\n");
141     str.append("dataType = " + getDataType() + "\n");
142     str.append("transformClass = " + getTransformClassName() + "\n");
143     str.append("description = " + getDescription() + "\n");
144     return str.toString();
145   }
146 }