KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > webservice > types > PropertyDefinition


1 /**
2  * PropertyDefinition.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.repo.webservice.types;
9
10 public class PropertyDefinition extends org.alfresco.repo.webservice.types.ValueDefinition implements java.io.Serializable JavaDoc {
11     private boolean mandatory;
12
13     private boolean readOnly;
14
15     private java.lang.String JavaDoc defaultValue;
16
17     public PropertyDefinition() {
18     }
19
20     public PropertyDefinition(
21            java.lang.String JavaDoc name,
22            java.lang.String JavaDoc title,
23            java.lang.String JavaDoc description,
24            java.lang.String JavaDoc dataType,
25            boolean mandatory,
26            boolean readOnly,
27            java.lang.String JavaDoc defaultValue) {
28         super(
29             name,
30             title,
31             description,
32             dataType);
33         this.mandatory = mandatory;
34         this.readOnly = readOnly;
35         this.defaultValue = defaultValue;
36     }
37
38
39     /**
40      * Gets the mandatory value for this PropertyDefinition.
41      *
42      * @return mandatory
43      */

44     public boolean isMandatory() {
45         return mandatory;
46     }
47
48
49     /**
50      * Sets the mandatory value for this PropertyDefinition.
51      *
52      * @param mandatory
53      */

54     public void setMandatory(boolean mandatory) {
55         this.mandatory = mandatory;
56     }
57
58
59     /**
60      * Gets the readOnly value for this PropertyDefinition.
61      *
62      * @return readOnly
63      */

64     public boolean isReadOnly() {
65         return readOnly;
66     }
67
68
69     /**
70      * Sets the readOnly value for this PropertyDefinition.
71      *
72      * @param readOnly
73      */

74     public void setReadOnly(boolean readOnly) {
75         this.readOnly = readOnly;
76     }
77
78
79     /**
80      * Gets the defaultValue value for this PropertyDefinition.
81      *
82      * @return defaultValue
83      */

84     public java.lang.String JavaDoc getDefaultValue() {
85         return defaultValue;
86     }
87
88
89     /**
90      * Sets the defaultValue value for this PropertyDefinition.
91      *
92      * @param defaultValue
93      */

94     public void setDefaultValue(java.lang.String JavaDoc defaultValue) {
95         this.defaultValue = defaultValue;
96     }
97
98     private java.lang.Object JavaDoc __equalsCalc = null;
99     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
100         if (!(obj instanceof PropertyDefinition)) return false;
101         PropertyDefinition other = (PropertyDefinition) obj;
102         if (obj == null) return false;
103         if (this == obj) return true;
104         if (__equalsCalc != null) {
105             return (__equalsCalc == obj);
106         }
107         __equalsCalc = obj;
108         boolean _equals;
109         _equals = super.equals(obj) &&
110             this.mandatory == other.isMandatory() &&
111             this.readOnly == other.isReadOnly() &&
112             ((this.defaultValue==null && other.getDefaultValue()==null) ||
113              (this.defaultValue!=null &&
114               this.defaultValue.equals(other.getDefaultValue())));
115         __equalsCalc = null;
116         return _equals;
117     }
118
119     private boolean __hashCodeCalc = false;
120     public synchronized int hashCode() {
121         if (__hashCodeCalc) {
122             return 0;
123         }
124         __hashCodeCalc = true;
125         int _hashCode = super.hashCode();
126         _hashCode += (isMandatory() ? Boolean.TRUE : Boolean.FALSE).hashCode();
127         _hashCode += (isReadOnly() ? Boolean.TRUE : Boolean.FALSE).hashCode();
128         if (getDefaultValue() != null) {
129             _hashCode += getDefaultValue().hashCode();
130         }
131         __hashCodeCalc = false;
132         return _hashCode;
133     }
134
135     // Type metadata
136
private static org.apache.axis.description.TypeDesc typeDesc =
137         new org.apache.axis.description.TypeDesc(PropertyDefinition.class, true);
138
139     static {
140         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "PropertyDefinition"));
141         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
142         elemField.setFieldName("mandatory");
143         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "mandatory"));
144         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "boolean"));
145         elemField.setNillable(false);
146         typeDesc.addFieldDesc(elemField);
147         elemField = new org.apache.axis.description.ElementDesc();
148         elemField.setFieldName("readOnly");
149         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "readOnly"));
150         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "boolean"));
151         elemField.setNillable(false);
152         typeDesc.addFieldDesc(elemField);
153         elemField = new org.apache.axis.description.ElementDesc();
154         elemField.setFieldName("defaultValue");
155         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "defaultValue"));
156         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
157         elemField.setMinOccurs(0);
158         elemField.setNillable(false);
159         typeDesc.addFieldDesc(elemField);
160     }
161
162     /**
163      * Return type metadata object
164      */

165     public static org.apache.axis.description.TypeDesc getTypeDesc() {
166         return typeDesc;
167     }
168
169     /**
170      * Get Custom Serializer
171      */

172     public static org.apache.axis.encoding.Serializer getSerializer(
173            java.lang.String JavaDoc mechType,
174            java.lang.Class JavaDoc _javaType,
175            javax.xml.namespace.QName JavaDoc _xmlType) {
176         return
177           new org.apache.axis.encoding.ser.BeanSerializer(
178             _javaType, _xmlType, typeDesc);
179     }
180
181     /**
182      * Get Custom Deserializer
183      */

184     public static org.apache.axis.encoding.Deserializer getDeserializer(
185            java.lang.String JavaDoc mechType,
186            java.lang.Class JavaDoc _javaType,
187            javax.xml.namespace.QName JavaDoc _xmlType) {
188         return
189           new org.apache.axis.encoding.ser.BeanDeserializer(
190             _javaType, _xmlType, typeDesc);
191     }
192
193 }
194
Popular Tags