1 | |
package org.kuali.rice.core.api.uif; |
2 | |
|
3 | |
import org.apache.commons.lang.builder.EqualsBuilder; |
4 | |
import org.apache.commons.lang.builder.HashCodeBuilder; |
5 | |
import org.apache.commons.lang.builder.ToStringBuilder; |
6 | |
import org.kuali.rice.core.api.CoreConstants; |
7 | |
import org.kuali.rice.core.api.mo.ModelBuilder; |
8 | |
import org.kuali.rice.core.api.mo.ModelObjectComplete; |
9 | |
import org.w3c.dom.Element; |
10 | |
|
11 | |
import javax.xml.bind.annotation.XmlAccessType; |
12 | |
import javax.xml.bind.annotation.XmlAccessorType; |
13 | |
import javax.xml.bind.annotation.XmlAnyElement; |
14 | |
import javax.xml.bind.annotation.XmlType; |
15 | |
import java.util.Collection; |
16 | |
|
17 | |
@XmlAccessorType(XmlAccessType.NONE) |
18 | |
@XmlType(name = AbstractWidget.Constants.TYPE_NAME) |
19 | 0 | public abstract class AbstractWidget implements Widget, ModelObjectComplete { |
20 | |
|
21 | 0 | @SuppressWarnings("unused") |
22 | |
@XmlAnyElement |
23 | |
private final Collection<Element> _futureElements = null; |
24 | |
|
25 | |
@Override |
26 | |
public final int hashCode() { |
27 | 0 | return HashCodeBuilder.reflectionHashCode(this, Constants.HASH_CODE_EQUALS_EXCLUDE); |
28 | |
} |
29 | |
|
30 | |
@Override |
31 | |
public final boolean equals(Object obj) { |
32 | 0 | return EqualsBuilder.reflectionEquals(obj, this, Constants.HASH_CODE_EQUALS_EXCLUDE); |
33 | |
} |
34 | |
|
35 | |
@Override |
36 | |
public final String toString() { |
37 | 0 | return ToStringBuilder.reflectionToString(this); |
38 | |
} |
39 | |
|
40 | 0 | public abstract static class Builder implements Widget, ModelBuilder { |
41 | |
Builder() { |
42 | 0 | super(); |
43 | 0 | } |
44 | |
|
45 | |
|
46 | |
public abstract AbstractWidget build(); |
47 | |
} |
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | 0 | static class Constants { |
53 | |
final static String TYPE_NAME = "AbstractWidgetType"; |
54 | 0 | final static String[] HASH_CODE_EQUALS_EXCLUDE = {CoreConstants.CommonElements.FUTURE_ELEMENTS}; |
55 | |
} |
56 | |
} |