0efa17f6a641911e8b7e5914d88f9ef08224965f
[vamsas.git] / src / org / vamsas / objects / core / Entry.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 Entry.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Entry extends org.vamsas.client.Vobject 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Field _id
40      */
41     private java.lang.String _id;
42
43     /**
44      * Field _user
45      */
46     private java.lang.String _user;
47
48     /**
49      * Field _action
50      */
51     private java.lang.String _action;
52
53     /**
54      * Field _date
55      */
56     private org.exolab.castor.types.Date _date;
57
58
59       //----------------/
60      //- Constructors -/
61     //----------------/
62
63     public Entry() 
64      {
65         super();
66     } //-- org.vamsas.objects.core.Entry()
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 Entry) {
88         
89             Entry temp = (Entry)obj;
90             if (this._id != null) {
91                 if (temp._id == null) return false;
92                 else if (!(this._id.equals(temp._id))) 
93                     return false;
94             }
95             else if (temp._id != null)
96                 return false;
97             if (this._user != null) {
98                 if (temp._user == null) return false;
99                 else if (!(this._user.equals(temp._user))) 
100                     return false;
101             }
102             else if (temp._user != null)
103                 return false;
104             if (this._action != null) {
105                 if (temp._action == null) return false;
106                 else if (!(this._action.equals(temp._action))) 
107                     return false;
108             }
109             else if (temp._action != null)
110                 return false;
111             if (this._date != null) {
112                 if (temp._date == null) return false;
113                 else if (!(this._date.equals(temp._date))) 
114                     return false;
115             }
116             else if (temp._date != 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 'action'.
125      * 
126      * @return String
127      * @return the value of field 'action'.
128      */
129     public java.lang.String getAction()
130     {
131         return this._action;
132     } //-- java.lang.String getAction() 
133
134     /**
135      * Returns the value of field 'date'.
136      * 
137      * @return Date
138      * @return the value of field 'date'.
139      */
140     public org.exolab.castor.types.Date getDate()
141     {
142         return this._date;
143     } //-- org.exolab.castor.types.Date getDate() 
144
145     /**
146      * Returns the value of field 'id'.
147      * 
148      * @return String
149      * @return the value of field 'id'.
150      */
151     public java.lang.String getId()
152     {
153         return this._id;
154     } //-- java.lang.String getId() 
155
156     /**
157      * Returns the value of field 'user'.
158      * 
159      * @return String
160      * @return the value of field 'user'.
161      */
162     public java.lang.String getUser()
163     {
164         return this._user;
165     } //-- java.lang.String getUser() 
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 'action'.
215      * 
216      * @param action the value of field 'action'.
217      */
218     public void setAction(java.lang.String action)
219     {
220         this._action = action;
221     } //-- void setAction(java.lang.String) 
222
223     /**
224      * Sets the value of field 'date'.
225      * 
226      * @param date the value of field 'date'.
227      */
228     public void setDate(org.exolab.castor.types.Date date)
229     {
230         this._date = date;
231     } //-- void setDate(org.exolab.castor.types.Date) 
232
233     /**
234      * Sets the value of field 'id'.
235      * 
236      * @param id the value of field 'id'.
237      */
238     public void setId(java.lang.String id)
239     {
240         this._id = id;
241     } //-- void setId(java.lang.String) 
242
243     /**
244      * Sets the value of field 'user'.
245      * 
246      * @param user the value of field 'user'.
247      */
248     public void setUser(java.lang.String user)
249     {
250         this._user = user;
251     } //-- void setUser(java.lang.String) 
252
253     /**
254      * Method unmarshal
255      * 
256      * 
257      * 
258      * @param reader
259      * @return Entry
260      */
261     public static org.vamsas.objects.core.Entry unmarshal(java.io.Reader reader)
262         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
263     {
264         return (org.vamsas.objects.core.Entry) Unmarshaller.unmarshal(org.vamsas.objects.core.Entry.class, reader);
265     } //-- org.vamsas.objects.core.Entry 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 }