KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * ContentSegment.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.repo.webservice.content;
9
10 public class ContentSegment implements java.io.Serializable JavaDoc {
11     private long offset;
12
13     private long length;
14
15     public ContentSegment() {
16     }
17
18     public ContentSegment(
19            long offset,
20            long length) {
21            this.offset = offset;
22            this.length = length;
23     }
24
25
26     /**
27      * Gets the offset value for this ContentSegment.
28      *
29      * @return offset
30      */

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

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

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

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

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

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

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