KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * PropertyDefinition.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.example.webservice.types;
9
10 public class PropertyDefinition extends org.alfresco.example.webservice.types.ValueDefinition implements java.io.Serializable JavaDoc {
11     private boolean mandatory;
12     private boolean readOnly;
13     private java.lang.String JavaDoc defaultValue;
14
15     public PropertyDefinition() {
16     }
17
18     public PropertyDefinition(
19            boolean mandatory,
20            boolean readOnly,
21            java.lang.String JavaDoc defaultValue) {
22            this.mandatory = mandatory;
23            this.readOnly = readOnly;
24            this.defaultValue = defaultValue;
25     }
26
27
28     /**
29      * Gets the mandatory value for this PropertyDefinition.
30      *
31      * @return mandatory
32      */

33     public boolean isMandatory() {
34         return mandatory;
35     }
36
37
38     /**
39      * Sets the mandatory value for this PropertyDefinition.
40      *
41      * @param mandatory
42      */

43     public void setMandatory(boolean mandatory) {
44         this.mandatory = mandatory;
45     }
46
47
48     /**
49      * Gets the readOnly value for this PropertyDefinition.
50      *
51      * @return readOnly
52      */

53     public boolean isReadOnly() {
54         return readOnly;
55     }
56
57
58     /**
59      * Sets the readOnly value for this PropertyDefinition.
60      *
61      * @param readOnly
62      */

63     public void setReadOnly(boolean readOnly) {
64         this.readOnly = readOnly;
65     }
66
67
68     /**
69      * Gets the defaultValue value for this PropertyDefinition.
70      *
71      * @return defaultValue
72      */

73     public java.lang.String JavaDoc getDefaultValue() {
74         return defaultValue;
75     }
76
77
78     /**
79      * Sets the defaultValue value for this PropertyDefinition.
80      *
81      * @param defaultValue
82      */

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

154     public static org.apache.axis.description.TypeDesc getTypeDesc() {
155         return typeDesc;
156     }
157
158     /**
159      * Get Custom Serializer
160      */

161     public static org.apache.axis.encoding.Serializer getSerializer(
162            java.lang.String JavaDoc mechType,
163            java.lang.Class JavaDoc _javaType,
164            javax.xml.namespace.QName JavaDoc _xmlType) {
165         return
166           new org.apache.axis.encoding.ser.BeanSerializer(
167             _javaType, _xmlType, typeDesc);
168     }
169
170     /**
171      * Get Custom Deserializer
172      */

173     public static org.apache.axis.encoding.Deserializer getDeserializer(
174            java.lang.String JavaDoc mechType,
175            java.lang.Class JavaDoc _javaType,
176            javax.xml.namespace.QName JavaDoc _xmlType) {
177         return
178           new org.apache.axis.encoding.ser.BeanDeserializer(
179             _javaType, _xmlType, typeDesc);
180     }
181
182 }
183
Popular Tags