(no commit message)
[simdecs.git] / src / java / org / ufcspa / simdecs / diagram / mb / beans / PropertyEditorBean.java
CommitLineData
d076ae96 1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package org.ufcspa.simdecs.diagram.mb.beans;
6
7import java.io.Serializable;
8import java.lang.reflect.Field;
9
10/**
11 *
12 * @author maroni
13 */
14public class PropertyEditorBean implements Serializable {
15
16 private Field reflectionField;
17 private String name;
18 private Object value;
19 private Integer minLength;
20 private Integer maxLength;
21 private boolean required;
22
23 public PropertyEditorBean() {
24
25 }
26
27 public PropertyEditorBean(String name, Object value) {
28 this.name = name;
29 this.value = value;
30 }
31
32 @Override
33 public boolean equals(Object obj) {
34 if (obj == null) {
35 return false;
36 }
37 if (getClass() != obj.getClass()) {
38 return false;
39 }
40 final PropertyEditorBean other = (PropertyEditorBean) obj;
41 if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
42 return false;
43 }
44 if ((this.value == null) ? (other.value != null) : !this.value.equals(other.value)) {
45 return false;
46 }
47 return true;
48 }
49
50 @Override
51 public int hashCode() {
52 int hash = 7;
53 hash = 89 * hash + (this.name != null ? this.name.hashCode() : 0);
54 hash = 89 * hash + (this.value != null ? this.value.hashCode() : 0);
55 return hash;
56 }
57
58 public String getName() {
59 return name;
60 }
61
62 public void setName(String name) {
63 this.name = name;
64 }
65
66 public Object getValue() {
67 return value;
68 }
69
70 public void setValue(Object value) {
71 this.value = value;
72 }
73
74 public Integer getMaxLength() {
75 return maxLength;
76 }
77
78 public void setMaxLength(Integer maxLength) {
79 this.maxLength = maxLength;
80 }
81
82 public Integer getMinLength() {
83 return minLength;
84 }
85
86 public void setMinLength(Integer minLength) {
87 this.minLength = minLength;
88 }
89
90 public boolean isRequired() {
91 return required;
92 }
93
94 public void setRequired(boolean required) {
95 this.required = required;
96 }
97
98 public Field getReflectionField() {
99 return reflectionField;
100 }
101
102 public void setReflectionField(Field reflectionField) {
103 this.reflectionField = reflectionField;
104 }
105
106
107}