001: /**
002: * NamedString.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
006: */package oasis.names.tc.wsrp.v1.types;
007:
008: public class NamedString implements java.io.Serializable {
009: private java.lang.String value;
010: private java.lang.String name; // attribute
011:
012: public NamedString() {
013: }
014:
015: public NamedString(java.lang.String name, java.lang.String value) {
016: this .value = value;
017: this .name = name;
018: }
019:
020: /**
021: * Gets the value value for this NamedString.
022: *
023: * @return value
024: */
025: public java.lang.String getValue() {
026: return value;
027: }
028:
029: /**
030: * Sets the value value for this NamedString.
031: *
032: * @param value
033: */
034: public void setValue(java.lang.String value) {
035: this .value = value;
036: }
037:
038: /**
039: * Gets the name value for this NamedString.
040: *
041: * @return name
042: */
043: public java.lang.String getName() {
044: return name;
045: }
046:
047: /**
048: * Sets the name value for this NamedString.
049: *
050: * @param name
051: */
052: public void setName(java.lang.String name) {
053: this .name = name;
054: }
055:
056: private java.lang.Object __equalsCalc = null;
057:
058: public synchronized boolean equals(java.lang.Object obj) {
059: if (!(obj instanceof NamedString))
060: return false;
061: NamedString other = (NamedString) obj;
062: if (obj == null)
063: return false;
064: if (this == obj)
065: return true;
066: if (__equalsCalc != null) {
067: return (__equalsCalc == obj);
068: }
069: __equalsCalc = obj;
070: boolean _equals;
071: _equals = true
072: && ((this .value == null && other.getValue() == null) || (this .value != null && this .value
073: .equals(other.getValue())))
074: && ((this .name == null && other.getName() == null) || (this .name != null && this .name
075: .equals(other.getName())));
076: __equalsCalc = null;
077: return _equals;
078: }
079:
080: private boolean __hashCodeCalc = false;
081:
082: public synchronized int hashCode() {
083: if (__hashCodeCalc) {
084: return 0;
085: }
086: __hashCodeCalc = true;
087: int _hashCode = 1;
088: if (getValue() != null) {
089: _hashCode += getValue().hashCode();
090: }
091: if (getName() != null) {
092: _hashCode += getName().hashCode();
093: }
094: __hashCodeCalc = false;
095: return _hashCode;
096: }
097:
098: // Type metadata
099: private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
100: NamedString.class, true);
101:
102: static {
103: typeDesc.setXmlType(new javax.xml.namespace.QName(
104: "urn:oasis:names:tc:wsrp:v1:types", "NamedString"));
105: org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
106: attrField.setFieldName("name");
107: attrField.setXmlName(new javax.xml.namespace.QName("", "name"));
108: attrField.setXmlType(new javax.xml.namespace.QName(
109: "http://www.w3.org/2001/XMLSchema", "string"));
110: typeDesc.addFieldDesc(attrField);
111: org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
112: elemField.setFieldName("value");
113: elemField.setXmlName(new javax.xml.namespace.QName(
114: "urn:oasis:names:tc:wsrp:v1:types", "value"));
115: elemField.setXmlType(new javax.xml.namespace.QName(
116: "http://www.w3.org/2001/XMLSchema", "string"));
117: typeDesc.addFieldDesc(elemField);
118: }
119:
120: /**
121: * Return type metadata object
122: */
123: public static org.apache.axis.description.TypeDesc getTypeDesc() {
124: return typeDesc;
125: }
126:
127: /**
128: * Get Custom Serializer
129: */
130: public static org.apache.axis.encoding.Serializer getSerializer(
131: java.lang.String mechType, java.lang.Class _javaType,
132: javax.xml.namespace.QName _xmlType) {
133: return new org.apache.axis.encoding.ser.BeanSerializer(
134: _javaType, _xmlType, typeDesc);
135: }
136:
137: /**
138: * Get Custom Deserializer
139: */
140: public static org.apache.axis.encoding.Deserializer getDeserializer(
141: java.lang.String mechType, java.lang.Class _javaType,
142: javax.xml.namespace.QName _xmlType) {
143: return new org.apache.axis.encoding.ser.BeanDeserializer(
144: _javaType, _xmlType, typeDesc);
145: }
146:
147: }
|