KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * NodeDefinition.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 NodeDefinition implements java.io.Serializable JavaDoc {
11     private org.alfresco.example.webservice.types.ClassDefinition type;
12     private org.alfresco.example.webservice.types.ClassDefinition[] aspects;
13
14     public NodeDefinition() {
15     }
16
17     public NodeDefinition(
18            org.alfresco.example.webservice.types.ClassDefinition type,
19            org.alfresco.example.webservice.types.ClassDefinition[] aspects) {
20            this.type = type;
21            this.aspects = aspects;
22     }
23
24
25     /**
26      * Gets the type value for this NodeDefinition.
27      *
28      * @return type
29      */

30     public org.alfresco.example.webservice.types.ClassDefinition getType() {
31         return type;
32     }
33
34
35     /**
36      * Sets the type value for this NodeDefinition.
37      *
38      * @param type
39      */

40     public void setType(org.alfresco.example.webservice.types.ClassDefinition type) {
41         this.type = type;
42     }
43
44
45     /**
46      * Gets the aspects value for this NodeDefinition.
47      *
48      * @return aspects
49      */

50     public org.alfresco.example.webservice.types.ClassDefinition[] getAspects() {
51         return aspects;
52     }
53
54
55     /**
56      * Sets the aspects value for this NodeDefinition.
57      *
58      * @param aspects
59      */

60     public void setAspects(org.alfresco.example.webservice.types.ClassDefinition[] aspects) {
61         this.aspects = aspects;
62     }
63
64     public org.alfresco.example.webservice.types.ClassDefinition getAspects(int i) {
65         return this.aspects[i];
66     }
67
68     public void setAspects(int i, org.alfresco.example.webservice.types.ClassDefinition _value) {
69         this.aspects[i] = _value;
70     }
71
72     private java.lang.Object JavaDoc __equalsCalc = null;
73     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
74         if (!(obj instanceof NodeDefinition)) return false;
75         NodeDefinition other = (NodeDefinition) obj;
76         if (obj == null) return false;
77         if (this == obj) return true;
78         if (__equalsCalc != null) {
79             return (__equalsCalc == obj);
80         }
81         __equalsCalc = obj;
82         boolean _equals;
83         _equals = true &&
84             ((this.type==null && other.getType()==null) ||
85              (this.type!=null &&
86               this.type.equals(other.getType()))) &&
87             ((this.aspects==null && other.getAspects()==null) ||
88              (this.aspects!=null &&
89               java.util.Arrays.equals(this.aspects, other.getAspects())));
90         __equalsCalc = null;
91         return _equals;
92     }
93
94     private boolean __hashCodeCalc = false;
95     public synchronized int hashCode() {
96         if (__hashCodeCalc) {
97             return 0;
98         }
99         __hashCodeCalc = true;
100         int _hashCode = 1;
101         if (getType() != null) {
102             _hashCode += getType().hashCode();
103         }
104         if (getAspects() != null) {
105             for (int i=0;
106                  i<java.lang.reflect.Array.getLength(getAspects());
107                  i++) {
108                 java.lang.Object JavaDoc obj = java.lang.reflect.Array.get(getAspects(), i);
109                 if (obj != null &&
110                     !obj.getClass().isArray()) {
111                     _hashCode += obj.hashCode();
112                 }
113             }
114         }
115         __hashCodeCalc = false;
116         return _hashCode;
117     }
118
119     // Type metadata
120
private static org.apache.axis.description.TypeDesc typeDesc =
121         new org.apache.axis.description.TypeDesc(NodeDefinition.class, true);
122
123     static {
124         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "NodeDefinition"));
125         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
126         elemField.setFieldName("type");
127         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "type"));
128         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "ClassDefinition"));
129         elemField.setNillable(false);
130         typeDesc.addFieldDesc(elemField);
131         elemField = new org.apache.axis.description.ElementDesc();
132         elemField.setFieldName("aspects");
133         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "aspects"));
134         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "ClassDefinition"));
135         elemField.setMinOccurs(0);
136         elemField.setNillable(false);
137         elemField.setMaxOccursUnbounded(true);
138         typeDesc.addFieldDesc(elemField);
139     }
140
141     /**
142      * Return type metadata object
143      */

144     public static org.apache.axis.description.TypeDesc getTypeDesc() {
145         return typeDesc;
146     }
147
148     /**
149      * Get Custom Serializer
150      */

151     public static org.apache.axis.encoding.Serializer getSerializer(
152            java.lang.String JavaDoc mechType,
153            java.lang.Class JavaDoc _javaType,
154            javax.xml.namespace.QName JavaDoc _xmlType) {
155         return
156           new org.apache.axis.encoding.ser.BeanSerializer(
157             _javaType, _xmlType, typeDesc);
158     }
159
160     /**
161      * Get Custom Deserializer
162      */

163     public static org.apache.axis.encoding.Deserializer getDeserializer(
164            java.lang.String JavaDoc mechType,
165            java.lang.Class JavaDoc _javaType,
166            javax.xml.namespace.QName JavaDoc _xmlType) {
167         return
168           new org.apache.axis.encoding.ser.BeanDeserializer(
169             _javaType, _xmlType, typeDesc);
170     }
171
172 }
173
Popular Tags