objects from refactored schema.
[vamsas.git] / src / org / vamsas / objects / core / Application.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
23
24 /**
25  * Class Application.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Application extends org.vamsas.client.object 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Field _version
40      */
41     private java.lang.String _version;
42
43     /**
44      * Field _name
45      */
46     private java.lang.String _name;
47
48     /**
49      * Field _session
50      */
51     private java.lang.String _session;
52
53     /**
54      * Field _data
55      */
56     private java.lang.String _data;
57
58
59       //----------------/
60      //- Constructors -/
61     //----------------/
62
63     public Application() 
64      {
65         super();
66     } //-- org.vamsas.objects.core.Application()
67
68
69       //-----------/
70      //- Methods -/
71     //-----------/
72
73     /**
74      * Note: hashCode() has not been overriden
75      * 
76      * @param obj
77      * @return boolean
78      */
79     public boolean equals(java.lang.Object obj)
80     {
81         if ( this == obj )
82             return true;
83         
84         if (super.equals(obj)==false)
85             return false;
86         
87         if (obj instanceof Application) {
88         
89             Application temp = (Application)obj;
90             if (this._version != null) {
91                 if (temp._version == null) return false;
92                 else if (!(this._version.equals(temp._version))) 
93                     return false;
94             }
95             else if (temp._version != null)
96                 return false;
97             if (this._name != null) {
98                 if (temp._name == null) return false;
99                 else if (!(this._name.equals(temp._name))) 
100                     return false;
101             }
102             else if (temp._name != null)
103                 return false;
104             if (this._session != null) {
105                 if (temp._session == null) return false;
106                 else if (!(this._session.equals(temp._session))) 
107                     return false;
108             }
109             else if (temp._session != null)
110                 return false;
111             if (this._data != null) {
112                 if (temp._data == null) return false;
113                 else if (!(this._data.equals(temp._data))) 
114                     return false;
115             }
116             else if (temp._data != null)
117                 return false;
118             return true;
119         }
120         return false;
121     } //-- boolean equals(java.lang.Object) 
122
123     /**
124      * Returns the value of field 'data'.
125      * 
126      * @return String
127      * @return the value of field 'data'.
128      */
129     public java.lang.String getData()
130     {
131         return this._data;
132     } //-- java.lang.String getData() 
133
134     /**
135      * Returns the value of field 'name'.
136      * 
137      * @return String
138      * @return the value of field 'name'.
139      */
140     public java.lang.String getName()
141     {
142         return this._name;
143     } //-- java.lang.String getName() 
144
145     /**
146      * Returns the value of field 'session'.
147      * 
148      * @return String
149      * @return the value of field 'session'.
150      */
151     public java.lang.String getSession()
152     {
153         return this._session;
154     } //-- java.lang.String getSession() 
155
156     /**
157      * Returns the value of field 'version'.
158      * 
159      * @return String
160      * @return the value of field 'version'.
161      */
162     public java.lang.String getVersion()
163     {
164         return this._version;
165     } //-- java.lang.String getVersion() 
166
167     /**
168      * Method isValid
169      * 
170      * 
171      * 
172      * @return boolean
173      */
174     public boolean isValid()
175     {
176         try {
177             validate();
178         }
179         catch (org.exolab.castor.xml.ValidationException vex) {
180             return false;
181         }
182         return true;
183     } //-- boolean isValid() 
184
185     /**
186      * Method marshal
187      * 
188      * 
189      * 
190      * @param out
191      */
192     public void marshal(java.io.Writer out)
193         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
194     {
195         
196         Marshaller.marshal(this, out);
197     } //-- void marshal(java.io.Writer) 
198
199     /**
200      * Method marshal
201      * 
202      * 
203      * 
204      * @param handler
205      */
206     public void marshal(org.xml.sax.ContentHandler handler)
207         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
208     {
209         
210         Marshaller.marshal(this, handler);
211     } //-- void marshal(org.xml.sax.ContentHandler) 
212
213     /**
214      * Sets the value of field 'data'.
215      * 
216      * @param data the value of field 'data'.
217      */
218     public void setData(java.lang.String data)
219     {
220         this._data = data;
221     } //-- void setData(java.lang.String) 
222
223     /**
224      * Sets the value of field 'name'.
225      * 
226      * @param name the value of field 'name'.
227      */
228     public void setName(java.lang.String name)
229     {
230         this._name = name;
231     } //-- void setName(java.lang.String) 
232
233     /**
234      * Sets the value of field 'session'.
235      * 
236      * @param session the value of field 'session'.
237      */
238     public void setSession(java.lang.String session)
239     {
240         this._session = session;
241     } //-- void setSession(java.lang.String) 
242
243     /**
244      * Sets the value of field 'version'.
245      * 
246      * @param version the value of field 'version'.
247      */
248     public void setVersion(java.lang.String version)
249     {
250         this._version = version;
251     } //-- void setVersion(java.lang.String) 
252
253     /**
254      * Method unmarshal
255      * 
256      * 
257      * 
258      * @param reader
259      * @return Application
260      */
261     public static org.vamsas.objects.core.Application unmarshal(java.io.Reader reader)
262         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
263     {
264         return (org.vamsas.objects.core.Application) Unmarshaller.unmarshal(org.vamsas.objects.core.Application.class, reader);
265     } //-- org.vamsas.objects.core.Application unmarshal(java.io.Reader) 
266
267     /**
268      * Method validate
269      * 
270      */
271     public void validate()
272         throws org.exolab.castor.xml.ValidationException
273     {
274         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
275         validator.validate(this);
276     } //-- void validate() 
277
278 }