1 7 8 package org.alfresco.example.webservice.types; 9 10 public class PropertyDefinition extends org.alfresco.example.webservice.types.ValueDefinition implements java.io.Serializable { 11 private boolean mandatory; 12 private boolean readOnly; 13 private java.lang.String defaultValue; 14 15 public PropertyDefinition() { 16 } 17 18 public PropertyDefinition( 19 boolean mandatory, 20 boolean readOnly, 21 java.lang.String defaultValue) { 22 this.mandatory = mandatory; 23 this.readOnly = readOnly; 24 this.defaultValue = defaultValue; 25 } 26 27 28 33 public boolean isMandatory() { 34 return mandatory; 35 } 36 37 38 43 public void setMandatory(boolean mandatory) { 44 this.mandatory = mandatory; 45 } 46 47 48 53 public boolean isReadOnly() { 54 return readOnly; 55 } 56 57 58 63 public void setReadOnly(boolean readOnly) { 64 this.readOnly = readOnly; 65 } 66 67 68 73 public java.lang.String getDefaultValue() { 74 return defaultValue; 75 } 76 77 78 83 public void setDefaultValue(java.lang.String defaultValue) { 84 this.defaultValue = defaultValue; 85 } 86 87 private java.lang.Object __equalsCalc = null; 88 public synchronized boolean equals(java.lang.Object obj) { 89 if (!(obj instanceof PropertyDefinition)) return false; 90 PropertyDefinition other = (PropertyDefinition) obj; 91 if (obj == null) return false; 92 if (this == obj) return true; 93 if (__equalsCalc != null) { 94 return (__equalsCalc == obj); 95 } 96 __equalsCalc = obj; 97 boolean _equals; 98 _equals = super.equals(obj) && 99 this.mandatory == other.isMandatory() && 100 this.readOnly == other.isReadOnly() && 101 ((this.defaultValue==null && other.getDefaultValue()==null) || 102 (this.defaultValue!=null && 103 this.defaultValue.equals(other.getDefaultValue()))); 104 __equalsCalc = null; 105 return _equals; 106 } 107 108 private boolean __hashCodeCalc = false; 109 public synchronized int hashCode() { 110 if (__hashCodeCalc) { 111 return 0; 112 } 113 __hashCodeCalc = true; 114 int _hashCode = super.hashCode(); 115 _hashCode += (isMandatory() ? Boolean.TRUE : Boolean.FALSE).hashCode(); 116 _hashCode += (isReadOnly() ? Boolean.TRUE : Boolean.FALSE).hashCode(); 117 if (getDefaultValue() != null) { 118 _hashCode += getDefaultValue().hashCode(); 119 } 120 __hashCodeCalc = false; 121 return _hashCode; 122 } 123 124 private static org.apache.axis.description.TypeDesc typeDesc = 126 new org.apache.axis.description.TypeDesc(PropertyDefinition.class, true); 127 128 static { 129 typeDesc.setXmlType(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/model/content/1.0", "PropertyDefinition")); 130 org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); 131 elemField.setFieldName("mandatory"); 132 elemField.setXmlName(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/model/content/1.0", "mandatory")); 133 elemField.setXmlType(new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "boolean")); 134 elemField.setNillable(false); 135 typeDesc.addFieldDesc(elemField); 136 elemField = new org.apache.axis.description.ElementDesc(); 137 elemField.setFieldName("readOnly"); 138 elemField.setXmlName(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/model/content/1.0", "readOnly")); 139 elemField.setXmlType(new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "boolean")); 140 elemField.setNillable(false); 141 typeDesc.addFieldDesc(elemField); 142 elemField = new org.apache.axis.description.ElementDesc(); 143 elemField.setFieldName("defaultValue"); 144 elemField.setXmlName(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/model/content/1.0", "defaultValue")); 145 elemField.setXmlType(new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "string")); 146 elemField.setMinOccurs(0); 147 elemField.setNillable(false); 148 typeDesc.addFieldDesc(elemField); 149 } 150 151 154 public static org.apache.axis.description.TypeDesc getTypeDesc() { 155 return typeDesc; 156 } 157 158 161 public static org.apache.axis.encoding.Serializer getSerializer( 162 java.lang.String mechType, 163 java.lang.Class _javaType, 164 javax.xml.namespace.QName _xmlType) { 165 return 166 new org.apache.axis.encoding.ser.BeanSerializer( 167 _javaType, _xmlType, typeDesc); 168 } 169 170 173 public static org.apache.axis.encoding.Deserializer getDeserializer( 174 java.lang.String mechType, 175 java.lang.Class _javaType, 176 javax.xml.namespace.QName _xmlType) { 177 return 178 new org.apache.axis.encoding.ser.BeanDeserializer( 179 _javaType, _xmlType, typeDesc); 180 } 181 182 } 183 | Popular Tags |