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