KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > example > webservice > content > ContentSegment


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

30     public long getOffset() {
31         return offset;
32     }
33
34
35     /**
36      * Sets the offset value for this ContentSegment.
37      *
38      * @param offset
39      */

40     public void setOffset(long offset) {
41         this.offset = offset;
42     }
43
44
45     /**
46      * Gets the length value for this ContentSegment.
47      *
48      * @return length
49      */

50     public long getLength() {
51         return length;
52     }
53
54
55     /**
56      * Sets the length value for this ContentSegment.
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 ContentSegment)) return false;
67         ContentSegment other = (ContentSegment) 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.offset == other.getOffset() &&
77             this.length == other.getLength();
78         __equalsCalc = null;
79         return _equals;
80     }
81
82     private boolean __hashCodeCalc = false;
83     public synchronized int hashCode() {
84         if (__hashCodeCalc) {
85             return 0;
86         }
87         __hashCodeCalc = true;
88         int _hashCode = 1;
89         _hashCode += new Long JavaDoc(getOffset()).hashCode();
90         _hashCode += new Long JavaDoc(getLength()).hashCode();
91         __hashCodeCalc = false;
92         return _hashCode;
93     }
94
95     // Type metadata
96
private static org.apache.axis.description.TypeDesc typeDesc =
97         new org.apache.axis.description.TypeDesc(ContentSegment.class, true);
98
99     static {
100         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/content/1.0", "ContentSegment"));
101         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
102         elemField.setFieldName("offset");
103         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/content/1.0", "offset"));
104         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "long"));
105         elemField.setNillable(false);
106         typeDesc.addFieldDesc(elemField);
107         elemField = new org.apache.axis.description.ElementDesc();
108         elemField.setFieldName("length");
109         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/content/1.0", "length"));
110         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "long"));
111         elemField.setNillable(false);
112         typeDesc.addFieldDesc(elemField);
113     }
114
115     /**
116      * Return type metadata object
117      */

118     public static org.apache.axis.description.TypeDesc getTypeDesc() {
119         return typeDesc;
120     }
121
122     /**
123      * Get Custom Serializer
124      */

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

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