1   /**
2    * SessionContext.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class SessionContext  implements java.io.Serializable {
11      private java.lang.String sessionID;
12      private int expires;
13      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
14  
15      public SessionContext() {
16      }
17  
18      public SessionContext(
19             int expires,
20             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
21             java.lang.String sessionID) {
22             this.sessionID = sessionID;
23             this.expires = expires;
24             this.extensions = extensions;
25      }
26  
27  
28      /**
29       * Gets the sessionID value for this SessionContext.
30       * 
31       * @return sessionID
32       */
33      public java.lang.String getSessionID() {
34          return sessionID;
35      }
36  
37  
38      /**
39       * Sets the sessionID value for this SessionContext.
40       * 
41       * @param sessionID
42       */
43      public void setSessionID(java.lang.String sessionID) {
44          this.sessionID = sessionID;
45      }
46  
47  
48      /**
49       * Gets the expires value for this SessionContext.
50       * 
51       * @return expires
52       */
53      public int getExpires() {
54          return expires;
55      }
56  
57  
58      /**
59       * Sets the expires value for this SessionContext.
60       * 
61       * @param expires
62       */
63      public void setExpires(int expires) {
64          this.expires = expires;
65      }
66  
67  
68      /**
69       * Gets the extensions value for this SessionContext.
70       * 
71       * @return extensions
72       */
73      public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
74          return extensions;
75      }
76  
77  
78      /**
79       * Sets the extensions value for this SessionContext.
80       * 
81       * @param extensions
82       */
83      public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
84          this.extensions = extensions;
85      }
86  
87      public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
88          return this.extensions[i];
89      }
90  
91      public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
92          this.extensions[i] = _value;
93      }
94  
95      private java.lang.Object __equalsCalc = null;
96      public synchronized boolean equals(java.lang.Object obj) {
97          if (!(obj instanceof SessionContext)) return false;
98          SessionContext other = (SessionContext) obj;
99          if (obj == null) return false;
100         if (this == obj) return true;
101         if (__equalsCalc != null) {
102             return (__equalsCalc == obj);
103         }
104         __equalsCalc = obj;
105         boolean _equals;
106         _equals = true && 
107             ((this.sessionID==null && other.getSessionID()==null) || 
108              (this.sessionID!=null &&
109               this.sessionID.equals(other.getSessionID()))) &&
110             this.expires == other.getExpires() &&
111             ((this.extensions==null && other.getExtensions()==null) || 
112              (this.extensions!=null &&
113               java.util.Arrays.equals(this.extensions, other.getExtensions())));
114         __equalsCalc = null;
115         return _equals;
116     }
117 
118     private boolean __hashCodeCalc = false;
119     public synchronized int hashCode() {
120         if (__hashCodeCalc) {
121             return 0;
122         }
123         __hashCodeCalc = true;
124         int _hashCode = 1;
125         if (getSessionID() != null) {
126             _hashCode += getSessionID().hashCode();
127         }
128         _hashCode += getExpires();
129         if (getExtensions() != null) {
130             for (int i=0;
131                  i<java.lang.reflect.Array.getLength(getExtensions());
132                  i++) {
133                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
134                 if (obj != null &&
135                     !obj.getClass().isArray()) {
136                     _hashCode += obj.hashCode();
137                 }
138             }
139         }
140         __hashCodeCalc = false;
141         return _hashCode;
142     }
143 
144     // Type metadata
145     private static org.apache.axis.description.TypeDesc typeDesc =
146         new org.apache.axis.description.TypeDesc(SessionContext.class, true);
147 
148     static {
149         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "SessionContext"));
150         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
151         elemField.setFieldName("sessionID");
152         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "sessionID"));
153         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
154         typeDesc.addFieldDesc(elemField);
155         elemField = new org.apache.axis.description.ElementDesc();
156         elemField.setFieldName("expires");
157         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "expires"));
158         elemField.setXmlType(new javax.xml.namespace.QName("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("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
163         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
164         elemField.setMinOccurs(0);
165         typeDesc.addFieldDesc(elemField);
166     }
167 
168     /**
169      * Return type metadata object
170      */
171     public static org.apache.axis.description.TypeDesc getTypeDesc() {
172         return typeDesc;
173     }
174 
175     /**
176      * Get Custom Serializer
177      */
178     public static org.apache.axis.encoding.Serializer getSerializer(
179            java.lang.String mechType, 
180            java.lang.Class _javaType,  
181            javax.xml.namespace.QName _xmlType) {
182         return 
183           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, 
192            java.lang.Class _javaType,  
193            javax.xml.namespace.QName _xmlType) {
194         return 
195           new  org.apache.axis.encoding.ser.BeanDeserializer(
196             _javaType, _xmlType, typeDesc);
197     }
198 
199 }
200