KickJava   Java API By Example, From Geeks To Geeks.

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


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

30     public java.lang.String JavaDoc getName() {
31         return name;
32     }
33
34
35     /**
36      * Sets the name value for this RoleDefinition.
37      *
38      * @param name
39      */

40     public void setName(java.lang.String JavaDoc name) {
41         this.name = name;
42     }
43
44
45     /**
46      * Gets the cardinality value for this RoleDefinition.
47      *
48      * @return cardinality
49      */

50     public org.alfresco.example.webservice.types.Cardinality getCardinality() {
51         return cardinality;
52     }
53
54
55     /**
56      * Sets the cardinality value for this RoleDefinition.
57      *
58      * @param cardinality
59      */

60     public void setCardinality(org.alfresco.example.webservice.types.Cardinality cardinality) {
61         this.cardinality = cardinality;
62     }
63
64     private java.lang.Object JavaDoc __equalsCalc = null;
65     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
66         if (!(obj instanceof RoleDefinition)) return false;
67         RoleDefinition other = (RoleDefinition) obj;
68         if (obj == null) return false;
69         if (this == obj) return true;
70         if (__equalsCalc != null) {
71             return (__equalsCalc == obj);
72         }
73         __equalsCalc = obj;
74         boolean _equals;
75         _equals = true &&
76             ((this.name==null && other.getName()==null) ||
77              (this.name!=null &&
78               this.name.equals(other.getName()))) &&
79             ((this.cardinality==null && other.getCardinality()==null) ||
80              (this.cardinality!=null &&
81               this.cardinality.equals(other.getCardinality())));
82         __equalsCalc = null;
83         return _equals;
84     }
85
86     private boolean __hashCodeCalc = false;
87     public synchronized int hashCode() {
88         if (__hashCodeCalc) {
89             return 0;
90         }
91         __hashCodeCalc = true;
92         int _hashCode = 1;
93         if (getName() != null) {
94             _hashCode += getName().hashCode();
95         }
96         if (getCardinality() != null) {
97             _hashCode += getCardinality().hashCode();
98         }
99         __hashCodeCalc = false;
100         return _hashCode;
101     }
102
103     // Type metadata
104
private static org.apache.axis.description.TypeDesc typeDesc =
105         new org.apache.axis.description.TypeDesc(RoleDefinition.class, true);
106
107     static {
108         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "RoleDefinition"));
109         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
110         elemField.setFieldName("name");
111         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "name"));
112         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "Name"));
113         elemField.setMinOccurs(0);
114         elemField.setNillable(false);
115         typeDesc.addFieldDesc(elemField);
116         elemField = new org.apache.axis.description.ElementDesc();
117         elemField.setFieldName("cardinality");
118         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "cardinality"));
119         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "Cardinality"));
120         elemField.setMinOccurs(0);
121         elemField.setNillable(false);
122         typeDesc.addFieldDesc(elemField);
123     }
124
125     /**
126      * Return type metadata object
127      */

128     public static org.apache.axis.description.TypeDesc getTypeDesc() {
129         return typeDesc;
130     }
131
132     /**
133      * Get Custom Serializer
134      */

135     public static org.apache.axis.encoding.Serializer getSerializer(
136            java.lang.String JavaDoc mechType,
137            java.lang.Class JavaDoc _javaType,
138            javax.xml.namespace.QName JavaDoc _xmlType) {
139         return
140           new org.apache.axis.encoding.ser.BeanSerializer(
141             _javaType, _xmlType, typeDesc);
142     }
143
144     /**
145      * Get Custom Deserializer
146      */

147     public static org.apache.axis.encoding.Deserializer getDeserializer(
148            java.lang.String JavaDoc mechType,
149            java.lang.Class JavaDoc _javaType,
150            javax.xml.namespace.QName JavaDoc _xmlType) {
151         return
152           new org.apache.axis.encoding.ser.BeanDeserializer(
153             _javaType, _xmlType, typeDesc);
154     }
155
156 }
157
Popular Tags