001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 1.0.2</a>, using an XML
004: * Schema.
005: * $Id: Container.java 6104 2006-08-23 06:32:44Z wguttmn $
006: */
007:
008: package org.exolab.castor.mapping.xml;
009:
010: import org.exolab.castor.xml.Marshaller;
011: import org.exolab.castor.xml.Unmarshaller;
012:
013: /**
014: * Class Container.
015: *
016: * @version $Revision: 6104 $ $Date: 2006-01-07 15:48:31 -0700 (Sat, 07 Jan 2006) $
017: */
018: public class Container implements java.io.Serializable {
019:
020: //--------------------------/
021: //- Class/Member Variables -/
022: //--------------------------/
023:
024: /**
025: * Field _name
026: */
027: private java.lang.String _name;
028:
029: /**
030: * Field _type
031: */
032: private java.lang.String _type;
033:
034: /**
035: * Field _required
036: */
037: private boolean _required = false;
038:
039: /**
040: * keeps track of state for field: _required
041: */
042: private boolean _has_required;
043:
044: /**
045: * Field _direct
046: */
047: private boolean _direct = false;
048:
049: /**
050: * keeps track of state for field: _direct
051: */
052: private boolean _has_direct;
053:
054: /**
055: * Field _getMethod
056: */
057: private java.lang.String _getMethod;
058:
059: /**
060: * Field _setMethod
061: */
062: private java.lang.String _setMethod;
063:
064: /**
065: * Field _createMethod
066: */
067: private java.lang.String _createMethod;
068:
069: /**
070: * Field _description
071: */
072: private java.lang.String _description;
073:
074: /**
075: * Field _fieldMapping
076: */
077: private org.exolab.castor.mapping.xml.FieldMapping _fieldMapping;
078:
079: //----------------/
080: //- Constructors -/
081: //----------------/
082:
083: public Container() {
084: super ();
085: } //-- org.exolab.castor.mapping.xml.Container()
086:
087: //-----------/
088: //- Methods -/
089: //-----------/
090:
091: /**
092: * Method deleteDirect
093: *
094: */
095: public void deleteDirect() {
096: this ._has_direct = false;
097: } //-- void deleteDirect()
098:
099: /**
100: * Method deleteRequired
101: *
102: */
103: public void deleteRequired() {
104: this ._has_required = false;
105: } //-- void deleteRequired()
106:
107: /**
108: * Returns the value of field 'createMethod'.
109: *
110: * @return String
111: * @return the value of field 'createMethod'.
112: */
113: public java.lang.String getCreateMethod() {
114: return this ._createMethod;
115: } //-- java.lang.String getCreateMethod()
116:
117: /**
118: * Returns the value of field 'description'.
119: *
120: * @return String
121: * @return the value of field 'description'.
122: */
123: public java.lang.String getDescription() {
124: return this ._description;
125: } //-- java.lang.String getDescription()
126:
127: /**
128: * Returns the value of field 'direct'.
129: *
130: * @return boolean
131: * @return the value of field 'direct'.
132: */
133: public boolean getDirect() {
134: return this ._direct;
135: } //-- boolean getDirect()
136:
137: /**
138: * Returns the value of field 'fieldMapping'.
139: *
140: * @return FieldMapping
141: * @return the value of field 'fieldMapping'.
142: */
143: public org.exolab.castor.mapping.xml.FieldMapping getFieldMapping() {
144: return this ._fieldMapping;
145: } //-- org.exolab.castor.mapping.xml.FieldMapping getFieldMapping()
146:
147: /**
148: * Returns the value of field 'getMethod'.
149: *
150: * @return String
151: * @return the value of field 'getMethod'.
152: */
153: public java.lang.String getGetMethod() {
154: return this ._getMethod;
155: } //-- java.lang.String getGetMethod()
156:
157: /**
158: * Returns the value of field 'name'.
159: *
160: * @return String
161: * @return the value of field 'name'.
162: */
163: public java.lang.String getName() {
164: return this ._name;
165: } //-- java.lang.String getName()
166:
167: /**
168: * Returns the value of field 'required'.
169: *
170: * @return boolean
171: * @return the value of field 'required'.
172: */
173: public boolean getRequired() {
174: return this ._required;
175: } //-- boolean getRequired()
176:
177: /**
178: * Returns the value of field 'setMethod'.
179: *
180: * @return String
181: * @return the value of field 'setMethod'.
182: */
183: public java.lang.String getSetMethod() {
184: return this ._setMethod;
185: } //-- java.lang.String getSetMethod()
186:
187: /**
188: * Returns the value of field 'type'.
189: *
190: * @return String
191: * @return the value of field 'type'.
192: */
193: public java.lang.String getType() {
194: return this ._type;
195: } //-- java.lang.String getType()
196:
197: /**
198: * Method hasDirect
199: *
200: *
201: *
202: * @return boolean
203: */
204: public boolean hasDirect() {
205: return this ._has_direct;
206: } //-- boolean hasDirect()
207:
208: /**
209: * Method hasRequired
210: *
211: *
212: *
213: * @return boolean
214: */
215: public boolean hasRequired() {
216: return this ._has_required;
217: } //-- boolean hasRequired()
218:
219: /**
220: * Method isValid
221: *
222: *
223: *
224: * @return boolean
225: */
226: public boolean isValid() {
227: try {
228: validate();
229: } catch (org.exolab.castor.xml.ValidationException vex) {
230: return false;
231: }
232: return true;
233: } //-- boolean isValid()
234:
235: /**
236: * Method marshal
237: *
238: *
239: *
240: * @param out
241: */
242: public void marshal(java.io.Writer out)
243: throws org.exolab.castor.xml.MarshalException,
244: org.exolab.castor.xml.ValidationException {
245:
246: Marshaller.marshal(this , out);
247: } //-- void marshal(java.io.Writer)
248:
249: /**
250: * Method marshal
251: *
252: *
253: *
254: * @param handler
255: */
256: public void marshal(org.xml.sax.ContentHandler handler)
257: throws java.io.IOException,
258: org.exolab.castor.xml.MarshalException,
259: org.exolab.castor.xml.ValidationException {
260:
261: Marshaller.marshal(this , handler);
262: } //-- void marshal(org.xml.sax.ContentHandler)
263:
264: /**
265: * Sets the value of field 'createMethod'.
266: *
267: * @param createMethod the value of field 'createMethod'.
268: */
269: public void setCreateMethod(java.lang.String createMethod) {
270: this ._createMethod = createMethod;
271: } //-- void setCreateMethod(java.lang.String)
272:
273: /**
274: * Sets the value of field 'description'.
275: *
276: * @param description the value of field 'description'.
277: */
278: public void setDescription(java.lang.String description) {
279: this ._description = description;
280: } //-- void setDescription(java.lang.String)
281:
282: /**
283: * Sets the value of field 'direct'.
284: *
285: * @param direct the value of field 'direct'.
286: */
287: public void setDirect(boolean direct) {
288: this ._direct = direct;
289: this ._has_direct = true;
290: } //-- void setDirect(boolean)
291:
292: /**
293: * Sets the value of field 'fieldMapping'.
294: *
295: * @param fieldMapping the value of field 'fieldMapping'.
296: */
297: public void setFieldMapping(
298: org.exolab.castor.mapping.xml.FieldMapping fieldMapping) {
299: this ._fieldMapping = fieldMapping;
300: } //-- void setFieldMapping(org.exolab.castor.mapping.xml.FieldMapping)
301:
302: /**
303: * Sets the value of field 'getMethod'.
304: *
305: * @param getMethod the value of field 'getMethod'.
306: */
307: public void setGetMethod(java.lang.String getMethod) {
308: this ._getMethod = getMethod;
309: } //-- void setGetMethod(java.lang.String)
310:
311: /**
312: * Sets the value of field 'name'.
313: *
314: * @param name the value of field 'name'.
315: */
316: public void setName(java.lang.String name) {
317: this ._name = name;
318: } //-- void setName(java.lang.String)
319:
320: /**
321: * Sets the value of field 'required'.
322: *
323: * @param required the value of field 'required'.
324: */
325: public void setRequired(boolean required) {
326: this ._required = required;
327: this ._has_required = true;
328: } //-- void setRequired(boolean)
329:
330: /**
331: * Sets the value of field 'setMethod'.
332: *
333: * @param setMethod the value of field 'setMethod'.
334: */
335: public void setSetMethod(java.lang.String setMethod) {
336: this ._setMethod = setMethod;
337: } //-- void setSetMethod(java.lang.String)
338:
339: /**
340: * Sets the value of field 'type'.
341: *
342: * @param type the value of field 'type'.
343: */
344: public void setType(java.lang.String type) {
345: this ._type = type;
346: } //-- void setType(java.lang.String)
347:
348: /**
349: * Method unmarshal
350: *
351: *
352: *
353: * @param reader
354: * @return Container
355: */
356: public static org.exolab.castor.mapping.xml.Container unmarshal(
357: java.io.Reader reader)
358: throws org.exolab.castor.xml.MarshalException,
359: org.exolab.castor.xml.ValidationException {
360: return (org.exolab.castor.mapping.xml.Container) Unmarshaller
361: .unmarshal(
362: org.exolab.castor.mapping.xml.Container.class,
363: reader);
364: } //-- org.exolab.castor.mapping.xml.Container unmarshal(java.io.Reader)
365:
366: /**
367: * Method validate
368: *
369: */
370: public void validate()
371: throws org.exolab.castor.xml.ValidationException {
372: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
373: validator.validate(this );
374: } //-- void validate()
375:
376: }
|