View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.xml.schema.annotations.jdo;
9   
10  /**
11   * Class ReadonlyDirtyType.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings("serial")
16  public class ReadonlyDirtyType implements java.io.Serializable {
17  
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * Attribute 'read-only' is used to set off changing
25       *  the column. If true, no update can be performed.
26       *  
27       */
28      private boolean _readOnly = false;
29  
30      /**
31       * keeps track of state for field: _readOnly
32       */
33      private boolean _has_readOnly;
34  
35      /**
36       * If the value is 'true', the field will not be
37       *  checked against the database for modification.
38       *  
39       */
40      private boolean _dirty = false;
41  
42      /**
43       * keeps track of state for field: _dirty
44       */
45      private boolean _has_dirty;
46  
47  
48        //----------------/
49       //- Constructors -/
50      //----------------/
51  
52      public ReadonlyDirtyType() {
53          super();
54      }
55  
56  
57        //-----------/
58       //- Methods -/
59      //-----------/
60  
61      /**
62       */
63      public void deleteDirty(
64      ) {
65          this._has_dirty= false;
66      }
67  
68      /**
69       */
70      public void deleteReadOnly(
71      ) {
72          this._has_readOnly= false;
73      }
74  
75      /**
76       * Returns the value of field 'dirty'. The field 'dirty' has
77       * the following description: If the value is 'true', the field
78       * will not be
79       *  checked against the database for modification.
80       *  
81       * 
82       * @return the value of field 'Dirty'.
83       */
84      public boolean getDirty(
85      ) {
86          return this._dirty;
87      }
88  
89      /**
90       * Returns the value of field 'readOnly'. The field 'readOnly'
91       * has the following description: Attribute 'read-only' is used
92       * to set off changing
93       *  the column. If true, no update can be performed.
94       *  
95       * 
96       * @return the value of field 'ReadOnly'.
97       */
98      public boolean getReadOnly(
99      ) {
100         return this._readOnly;
101     }
102 
103     /**
104      * Method hasDirty.
105      * 
106      * @return true if at least one Dirty has been added
107      */
108     public boolean hasDirty(
109     ) {
110         return this._has_dirty;
111     }
112 
113     /**
114      * Method hasReadOnly.
115      * 
116      * @return true if at least one ReadOnly has been added
117      */
118     public boolean hasReadOnly(
119     ) {
120         return this._has_readOnly;
121     }
122 
123     /**
124      * Returns the value of field 'dirty'. The field 'dirty' has
125      * the following description: If the value is 'true', the field
126      * will not be
127      *  checked against the database for modification.
128      *  
129      * 
130      * @return the value of field 'Dirty'.
131      */
132     public boolean isDirty(
133     ) {
134         return this._dirty;
135     }
136 
137     /**
138      * Returns the value of field 'readOnly'. The field 'readOnly'
139      * has the following description: Attribute 'read-only' is used
140      * to set off changing
141      *  the column. If true, no update can be performed.
142      *  
143      * 
144      * @return the value of field 'ReadOnly'.
145      */
146     public boolean isReadOnly(
147     ) {
148         return this._readOnly;
149     }
150 
151     /**
152      * Method isValid.
153      * 
154      * @return true if this object is valid according to the schema
155      */
156     public boolean isValid(
157     ) {
158         try {
159             validate();
160         } catch (org.exolab.castor.xml.ValidationException vex) {
161             return false;
162         }
163         return true;
164     }
165 
166     /**
167      * 
168      * 
169      * @param out
170      * @throws org.exolab.castor.xml.MarshalException if object is
171      * null or if any SAXException is thrown during marshaling
172      * @throws org.exolab.castor.xml.ValidationException if this
173      * object is an invalid instance according to the schema
174      */
175     public void marshal(
176             final java.io.Writer out)
177     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
178         org.exolab.castor.xml.Marshaller.marshal(this, out);
179     }
180 
181     /**
182      * 
183      * 
184      * @param handler
185      * @throws java.io.IOException if an IOException occurs during
186      * marshaling
187      * @throws org.exolab.castor.xml.ValidationException if this
188      * object is an invalid instance according to the schema
189      * @throws org.exolab.castor.xml.MarshalException if object is
190      * null or if any SAXException is thrown during marshaling
191      */
192     public void marshal(
193             final org.xml.sax.ContentHandler handler)
194     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
195         org.exolab.castor.xml.Marshaller.marshal(this, handler);
196     }
197 
198     /**
199      * Sets the value of field 'dirty'. The field 'dirty' has the
200      * following description: If the value is 'true', the field
201      * will not be
202      *  checked against the database for modification.
203      *  
204      * 
205      * @param dirty the value of field 'dirty'.
206      */
207     public void setDirty(
208             final boolean dirty) {
209         this._dirty = dirty;
210         this._has_dirty = true;
211     }
212 
213     /**
214      * Sets the value of field 'readOnly'. The field 'readOnly' has
215      * the following description: Attribute 'read-only' is used to
216      * set off changing
217      *  the column. If true, no update can be performed.
218      *  
219      * 
220      * @param readOnly the value of field 'readOnly'.
221      */
222     public void setReadOnly(
223             final boolean readOnly) {
224         this._readOnly = readOnly;
225         this._has_readOnly = true;
226     }
227 
228     /**
229      * Method unmarshal.
230      * 
231      * @param reader
232      * @throws org.exolab.castor.xml.MarshalException if object is
233      * null or if any SAXException is thrown during marshaling
234      * @throws org.exolab.castor.xml.ValidationException if this
235      * object is an invalid instance according to the schema
236      * @return the unmarshaled
237      * org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyTyp
238      */
239     public static org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType unmarshal(
240             final java.io.Reader reader)
241     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
242         return (org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType.class, reader);
243     }
244 
245     /**
246      * 
247      * 
248      * @throws org.exolab.castor.xml.ValidationException if this
249      * object is an invalid instance according to the schema
250      */
251     public void validate(
252     )
253     throws org.exolab.castor.xml.ValidationException {
254         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
255         validator.validate(this);
256     }
257 
258 }