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