KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * Content.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.repo.webservice.types;
9
10 public class Content extends org.alfresco.repo.webservice.types.Node implements java.io.Serializable JavaDoc {
11     private org.alfresco.repo.webservice.types.ContentFormat format;
12     private long length;
13
14     public Content() {
15     }
16
17     public Content(
18            org.alfresco.repo.webservice.types.ContentFormat format,
19            long length) {
20            this.format = format;
21            this.length = length;
22     }
23
24
25     /**
26      * Gets the format value for this Content.
27      *
28      * @return format
29      */

30     public org.alfresco.repo.webservice.types.ContentFormat getFormat() {
31         return format;
32     }
33
34
35     /**
36      * Sets the format value for this Content.
37      *
38      * @param format
39      */

40     public void setFormat(org.alfresco.repo.webservice.types.ContentFormat format) {
41         this.format = format;
42     }
43
44
45     /**
46      * Gets the length value for this Content.
47      *
48      * @return length
49      */

50     public long getLength() {
51         return length;
52     }
53
54
55     /**
56      * Sets the length value for this Content.
57      *
58      * @param length
59      */

60     public void setLength(long length) {
61         this.length = length;
62     }
63
64     private java.lang.Object JavaDoc __equalsCalc = null;
65     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
66         if (!(obj instanceof Content)) return false;
67         Content other = (Content) 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 = super.equals(obj) &&
76             ((this.format==null && other.getFormat()==null) ||
77              (this.format!=null &&
78               this.format.equals(other.getFormat()))) &&
79             this.length == other.getLength();
80         __equalsCalc = null;
81         return _equals;
82     }
83
84     private boolean __hashCodeCalc = false;
85     public synchronized int hashCode() {
86         if (__hashCodeCalc) {
87             return 0;
88         }
89         __hashCodeCalc = true;
90         int _hashCode = super.hashCode();
91         if (getFormat() != null) {
92             _hashCode += getFormat().hashCode();
93         }
94         _hashCode += new Long JavaDoc(getLength()).hashCode();
95         __hashCodeCalc = false;
96         return _hashCode;
97     }
98
99     // Type metadata
100
private static org.apache.axis.description.TypeDesc typeDesc =
101         new org.apache.axis.description.TypeDesc(Content.class, true);
102
103     static {
104         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "Content"));
105         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
106         elemField.setFieldName("format");
107         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "format"));
108         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "ContentFormat"));
109         elemField.setNillable(false);
110         typeDesc.addFieldDesc(elemField);
111         elemField = new org.apache.axis.description.ElementDesc();
112         elemField.setFieldName("length");
113         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "length"));
114         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "long"));
115         elemField.setNillable(false);
116         typeDesc.addFieldDesc(elemField);
117     }
118
119     /**
120      * Return type metadata object
121      */

122     public static org.apache.axis.description.TypeDesc getTypeDesc() {
123         return typeDesc;
124     }
125
126     /**
127      * Get Custom Serializer
128      */

129     public static org.apache.axis.encoding.Serializer getSerializer(
130            java.lang.String JavaDoc mechType,
131            java.lang.Class JavaDoc _javaType,
132            javax.xml.namespace.QName JavaDoc _xmlType) {
133         return
134           new org.apache.axis.encoding.ser.BeanSerializer(
135             _javaType, _xmlType, typeDesc);
136     }
137
138     /**
139      * Get Custom Deserializer
140      */

141     public static org.apache.axis.encoding.Deserializer getDeserializer(
142            java.lang.String JavaDoc mechType,
143            java.lang.Class JavaDoc _javaType,
144            javax.xml.namespace.QName JavaDoc _xmlType) {
145         return
146           new org.apache.axis.encoding.ser.BeanDeserializer(
147             _javaType, _xmlType, typeDesc);
148     }
149
150 }
151
Popular Tags