View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.hardcode.juf.status;
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 Status.
26   * 
27   * @version $Revision$ $Date$
28   */
29  public class Status implements java.io.Serializable {
30  
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      /***
37       * Field _componentName
38       */
39      private java.lang.String _componentName;
40  
41      /***
42       * Field _version
43       */
44      private int _version;
45  
46      /***
47       * keeps track of state for field: _version
48       */
49      private boolean _has_version;
50  
51  
52        //----------------/
53       //- Constructors -/
54      //----------------/
55  
56      public Status() {
57          super();
58      } //-- org.hardcode.juf.status.Status()
59  
60  
61        //-----------/
62       //- Methods -/
63      //-----------/
64  
65      /***
66       * Method deleteVersion
67       */
68      public void deleteVersion()
69      {
70          this._has_version= false;
71      } //-- void deleteVersion() 
72  
73      /***
74       * Returns the value of field 'componentName'.
75       * 
76       * @return the value of field 'componentName'.
77       */
78      public java.lang.String getComponentName()
79      {
80          return this._componentName;
81      } //-- java.lang.String getComponentName() 
82  
83      /***
84       * Returns the value of field 'version'.
85       * 
86       * @return the value of field 'version'.
87       */
88      public int getVersion()
89      {
90          return this._version;
91      } //-- int getVersion() 
92  
93      /***
94       * Method hasVersion
95       */
96      public boolean hasVersion()
97      {
98          return this._has_version;
99      } //-- boolean hasVersion() 
100 
101     /***
102      * Method isValid
103      */
104     public boolean isValid()
105     {
106         try {
107             validate();
108         }
109         catch (org.exolab.castor.xml.ValidationException vex) {
110             return false;
111         }
112         return true;
113     } //-- boolean isValid() 
114 
115     /***
116      * Method marshal
117      * 
118      * @param out
119      */
120     public void marshal(java.io.Writer out)
121         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
122     {
123         
124         Marshaller.marshal(this, out);
125     } //-- void marshal(java.io.Writer) 
126 
127     /***
128      * Method marshal
129      * 
130      * @param handler
131      */
132     public void marshal(org.xml.sax.ContentHandler handler)
133         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
134     {
135         
136         Marshaller.marshal(this, handler);
137     } //-- void marshal(org.xml.sax.ContentHandler) 
138 
139     /***
140      * Sets the value of field 'componentName'.
141      * 
142      * @param componentName the value of field 'componentName'.
143      */
144     public void setComponentName(java.lang.String componentName)
145     {
146         this._componentName = componentName;
147     } //-- void setComponentName(java.lang.String) 
148 
149     /***
150      * Sets the value of field 'version'.
151      * 
152      * @param version the value of field 'version'.
153      */
154     public void setVersion(int version)
155     {
156         this._version = version;
157         this._has_version = true;
158     } //-- void setVersion(int) 
159 
160     /***
161      * Method unmarshal
162      * 
163      * @param reader
164      */
165     public static java.lang.Object unmarshal(java.io.Reader reader)
166         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
167     {
168         return (org.hardcode.juf.status.Status) Unmarshaller.unmarshal(org.hardcode.juf.status.Status.class, reader);
169     } //-- java.lang.Object unmarshal(java.io.Reader) 
170 
171     /***
172      * Method validate
173      */
174     public void validate()
175         throws org.exolab.castor.xml.ValidationException
176     {
177         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
178         validator.validate(this);
179     } //-- void validate() 
180 
181 }