first attempt at object build.
[vamsas.git] / src / org / vamsas / client / objects / Application.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.client.objects;
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.Object _version;
42
43     /**
44      * Field _name
45      */
46     private java.lang.Object _name;
47
48
49       //----------------/
50      //- Constructors -/
51     //----------------/
52
53     public Application() 
54      {
55         super();
56     } //-- org.vamsas.client.objects.Application()
57
58
59       //-----------/
60      //- Methods -/
61     //-----------/
62
63     /**
64      * Note: hashCode() has not been overriden
65      * 
66      * @param obj
67      * @return boolean
68      */
69     public boolean equals(java.lang.Object obj)
70     {
71         if ( this == obj )
72             return true;
73         
74         if (super.equals(obj)==false)
75             return false;
76         
77         if (obj instanceof Application) {
78         
79             Application temp = (Application)obj;
80             if (this._version != null) {
81                 if (temp._version == null) return false;
82                 else if (!(this._version.equals(temp._version))) 
83                     return false;
84             }
85             else if (temp._version != null)
86                 return false;
87             if (this._name != null) {
88                 if (temp._name == null) return false;
89                 else if (!(this._name.equals(temp._name))) 
90                     return false;
91             }
92             else if (temp._name != null)
93                 return false;
94             return true;
95         }
96         return false;
97     } //-- boolean equals(java.lang.Object) 
98
99     /**
100      * Returns the value of field 'name'.
101      * 
102      * @return Object
103      * @return the value of field 'name'.
104      */
105     public java.lang.Object getName()
106     {
107         return this._name;
108     } //-- java.lang.Object getName() 
109
110     /**
111      * Returns the value of field 'version'.
112      * 
113      * @return Object
114      * @return the value of field 'version'.
115      */
116     public java.lang.Object getVersion()
117     {
118         return this._version;
119     } //-- java.lang.Object getVersion() 
120
121     /**
122      * Method isValid
123      * 
124      * 
125      * 
126      * @return boolean
127      */
128     public boolean isValid()
129     {
130         try {
131             validate();
132         }
133         catch (org.exolab.castor.xml.ValidationException vex) {
134             return false;
135         }
136         return true;
137     } //-- boolean isValid() 
138
139     /**
140      * Method marshal
141      * 
142      * 
143      * 
144      * @param out
145      */
146     public void marshal(java.io.Writer out)
147         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
148     {
149         
150         Marshaller.marshal(this, out);
151     } //-- void marshal(java.io.Writer) 
152
153     /**
154      * Method marshal
155      * 
156      * 
157      * 
158      * @param handler
159      */
160     public void marshal(org.xml.sax.ContentHandler handler)
161         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
162     {
163         
164         Marshaller.marshal(this, handler);
165     } //-- void marshal(org.xml.sax.ContentHandler) 
166
167     /**
168      * Sets the value of field 'name'.
169      * 
170      * @param name the value of field 'name'.
171      */
172     public void setName(java.lang.Object name)
173     {
174         this._name = name;
175     } //-- void setName(java.lang.Object) 
176
177     /**
178      * Sets the value of field 'version'.
179      * 
180      * @param version the value of field 'version'.
181      */
182     public void setVersion(java.lang.Object version)
183     {
184         this._version = version;
185     } //-- void setVersion(java.lang.Object) 
186
187     /**
188      * Method unmarshal
189      * 
190      * 
191      * 
192      * @param reader
193      * @return Application
194      */
195     public static org.vamsas.client.objects.Application unmarshal(java.io.Reader reader)
196         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
197     {
198         return (org.vamsas.client.objects.Application) Unmarshaller.unmarshal(org.vamsas.client.objects.Application.class, reader);
199     } //-- org.vamsas.client.objects.Application unmarshal(java.io.Reader) 
200
201     /**
202      * Method validate
203      * 
204      */
205     public void validate()
206         throws org.exolab.castor.xml.ValidationException
207     {
208         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
209         validator.validate(this);
210     } //-- void validate() 
211
212 }