1 7 8 package org.alfresco.repo.webservice.content; 9 10 public class ContentSegment implements java.io.Serializable { 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 31 public long getOffset() { 32 return offset; 33 } 34 35 36 41 public void setOffset(long offset) { 42 this.offset = offset; 43 } 44 45 46 51 public long getLength() { 52 return length; 53 } 54 55 56 61 public void setLength(long length) { 62 this.length = length; 63 } 64 65 private java.lang.Object __equalsCalc = null; 66 public synchronized boolean equals(java.lang.Object 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 (getOffset()).hashCode(); 91 _hashCode += new Long (getLength()).hashCode(); 92 __hashCodeCalc = false; 93 return _hashCode; 94 } 95 96 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 ("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 ("http://www.alfresco.org/ws/service/content/1.0", "offset")); 105 elemField.setXmlType(new javax.xml.namespace.QName ("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 ("http://www.alfresco.org/ws/service/content/1.0", "length")); 111 elemField.setXmlType(new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "long")); 112 elemField.setNillable(false); 113 typeDesc.addFieldDesc(elemField); 114 } 115 116 119 public static org.apache.axis.description.TypeDesc getTypeDesc() { 120 return typeDesc; 121 } 122 123 126 public static org.apache.axis.encoding.Serializer getSerializer( 127 java.lang.String mechType, 128 java.lang.Class _javaType, 129 javax.xml.namespace.QName _xmlType) { 130 return 131 new org.apache.axis.encoding.ser.BeanSerializer( 132 _javaType, _xmlType, typeDesc); 133 } 134 135 138 public static org.apache.axis.encoding.Deserializer getDeserializer( 139 java.lang.String mechType, 140 java.lang.Class _javaType, 141 javax.xml.namespace.QName _xmlType) { 142 return 143 new org.apache.axis.encoding.ser.BeanDeserializer( 144 _javaType, _xmlType, typeDesc); 145 } 146 147 } 148 | Popular Tags |