001: /**
002: * SessionContext.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 SessionContext implements java.io.Serializable {
009: private java.lang.String sessionID;
010: private int expires;
011: private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
012:
013: public SessionContext() {
014: }
015:
016: public SessionContext(int expires,
017: oasis.names.tc.wsrp.v1.types.Extension[] extensions,
018: java.lang.String sessionID) {
019: this .sessionID = sessionID;
020: this .expires = expires;
021: this .extensions = extensions;
022: }
023:
024: /**
025: * Gets the sessionID value for this SessionContext.
026: *
027: * @return sessionID
028: */
029: public java.lang.String getSessionID() {
030: return sessionID;
031: }
032:
033: /**
034: * Sets the sessionID value for this SessionContext.
035: *
036: * @param sessionID
037: */
038: public void setSessionID(java.lang.String sessionID) {
039: this .sessionID = sessionID;
040: }
041:
042: /**
043: * Gets the expires value for this SessionContext.
044: *
045: * @return expires
046: */
047: public int getExpires() {
048: return expires;
049: }
050:
051: /**
052: * Sets the expires value for this SessionContext.
053: *
054: * @param expires
055: */
056: public void setExpires(int expires) {
057: this .expires = expires;
058: }
059:
060: /**
061: * Gets the extensions value for this SessionContext.
062: *
063: * @return extensions
064: */
065: public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
066: return extensions;
067: }
068:
069: /**
070: * Sets the extensions value for this SessionContext.
071: *
072: * @param extensions
073: */
074: public void setExtensions(
075: oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
076: this .extensions = extensions;
077: }
078:
079: public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
080: return this .extensions[i];
081: }
082:
083: public void setExtensions(int i,
084: oasis.names.tc.wsrp.v1.types.Extension _value) {
085: this .extensions[i] = _value;
086: }
087:
088: private java.lang.Object __equalsCalc = null;
089:
090: public synchronized boolean equals(java.lang.Object obj) {
091: if (!(obj instanceof SessionContext))
092: return false;
093: SessionContext other = (SessionContext) obj;
094: if (obj == null)
095: return false;
096: if (this == obj)
097: return true;
098: if (__equalsCalc != null) {
099: return (__equalsCalc == obj);
100: }
101: __equalsCalc = obj;
102: boolean _equals;
103: _equals = true
104: && ((this .sessionID == null && other.getSessionID() == null) || (this .sessionID != null && this .sessionID
105: .equals(other.getSessionID())))
106: && this .expires == other.getExpires()
107: && ((this .extensions == null && other.getExtensions() == null) || (this .extensions != null && java.util.Arrays
108: .equals(this .extensions, other.getExtensions())));
109: __equalsCalc = null;
110: return _equals;
111: }
112:
113: private boolean __hashCodeCalc = false;
114:
115: public synchronized int hashCode() {
116: if (__hashCodeCalc) {
117: return 0;
118: }
119: __hashCodeCalc = true;
120: int _hashCode = 1;
121: if (getSessionID() != null) {
122: _hashCode += getSessionID().hashCode();
123: }
124: _hashCode += getExpires();
125: if (getExtensions() != null) {
126: for (int i = 0; i < java.lang.reflect.Array
127: .getLength(getExtensions()); i++) {
128: java.lang.Object obj = java.lang.reflect.Array.get(
129: getExtensions(), i);
130: if (obj != null && !obj.getClass().isArray()) {
131: _hashCode += obj.hashCode();
132: }
133: }
134: }
135: __hashCodeCalc = false;
136: return _hashCode;
137: }
138:
139: // Type metadata
140: private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
141: SessionContext.class, true);
142:
143: static {
144: typeDesc.setXmlType(new javax.xml.namespace.QName(
145: "urn:oasis:names:tc:wsrp:v1:types", "SessionContext"));
146: org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
147: elemField.setFieldName("sessionID");
148: elemField.setXmlName(new javax.xml.namespace.QName(
149: "urn:oasis:names:tc:wsrp:v1:types", "sessionID"));
150: elemField.setXmlType(new javax.xml.namespace.QName(
151: "http://www.w3.org/2001/XMLSchema", "string"));
152: typeDesc.addFieldDesc(elemField);
153: elemField = new org.apache.axis.description.ElementDesc();
154: elemField.setFieldName("expires");
155: elemField.setXmlName(new javax.xml.namespace.QName(
156: "urn:oasis:names:tc:wsrp:v1:types", "expires"));
157: elemField.setXmlType(new javax.xml.namespace.QName(
158: "http://www.w3.org/2001/XMLSchema", "int"));
159: typeDesc.addFieldDesc(elemField);
160: elemField = new org.apache.axis.description.ElementDesc();
161: elemField.setFieldName("extensions");
162: elemField.setXmlName(new javax.xml.namespace.QName(
163: "urn:oasis:names:tc:wsrp:v1:types", "extensions"));
164: elemField.setXmlType(new javax.xml.namespace.QName(
165: "urn:oasis:names:tc:wsrp:v1:types", "Extension"));
166: elemField.setMinOccurs(0);
167: typeDesc.addFieldDesc(elemField);
168: }
169:
170: /**
171: * Return type metadata object
172: */
173: public static org.apache.axis.description.TypeDesc getTypeDesc() {
174: return typeDesc;
175: }
176:
177: /**
178: * Get Custom Serializer
179: */
180: public static org.apache.axis.encoding.Serializer getSerializer(
181: java.lang.String mechType, java.lang.Class _javaType,
182: javax.xml.namespace.QName _xmlType) {
183: return new org.apache.axis.encoding.ser.BeanSerializer(
184: _javaType, _xmlType, typeDesc);
185: }
186:
187: /**
188: * Get Custom Deserializer
189: */
190: public static org.apache.axis.encoding.Deserializer getDeserializer(
191: java.lang.String mechType, java.lang.Class _javaType,
192: javax.xml.namespace.QName _xmlType) {
193: return new org.apache.axis.encoding.ser.BeanDeserializer(
194: _javaType, _xmlType, typeDesc);
195: }
196:
197: }
|