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 CpoClassBean implements java.io.Serializable {
24  
25    /*
26     * Properties
27     */
28    private java.lang.String name;
29    private java.lang.String description;
30  
31    public CpoClassBean() {
32    }
33  
34    /*
35     * Getters and Setters
36     */
37    public java.lang.String getName() {
38      return this.name;
39    }
40  
41    public void setName(java.lang.String name) {
42      this.name = name;
43    }
44  
45    public String getDescription() {
46      return description;
47    }
48  
49    public void setDescription(String description) {
50      this.description = description;
51    }
52  
53    @Override
54    public boolean equals(Object o) {
55      if (this == o) {
56        return true;
57      }
58      if (o == null || getClass() != o.getClass()) {
59        return false;
60      }
61  
62      CpoClassBean that = (CpoClassBean) o;
63  
64      if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) {
65        return false;
66      }
67      if (getDescription() != null ? !getDescription().equals(that.getDescription()) : that.getDescription() != null) {
68        return false;
69      }
70  
71      return true;
72    }
73  
74    @Override
75    public int hashCode() {
76      int result = 0;
77      result = 31 * result + getClass().getName().hashCode();
78      result = 31 * result + (getName() != null ? getName().hashCode() : 0);
79      result = 31 * result + (getDescription() != null ? getDescription().hashCode() : 0);
80      return result;
81    }
82  
83    @Override
84    public String toString() {
85      StringBuilder str = new StringBuilder();
86      str.append("name = " + getName() + "\n");
87      str.append("description = " + getDescription() + "\n");
88      return str.toString();
89    }
90  }