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 OneToMany.
12 *
13 * @version $Revision$ $Date$
14 */
15 @SuppressWarnings("serial")
16 public class OneToMany extends org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType
17 implements java.io.Serializable
18 {
19
20
21 //--------------------------/
22 //- Class/Member Variables -/
23 //--------------------------/
24
25 /**
26 * The name attribute specifies the name of
27 * the column that represents this
28 * relation.
29 *
30 */
31 private java.lang.String _name;
32
33
34 //----------------/
35 //- Constructors -/
36 //----------------/
37
38 public OneToMany() {
39 super();
40 }
41
42
43 //-----------/
44 //- Methods -/
45 //-----------/
46
47 /**
48 * Returns the value of field 'name'. The field 'name' has the
49 * following description: The name attribute specifies the name
50 * of
51 * the column that represents this
52 * relation.
53 *
54 *
55 * @return the value of field 'Name'.
56 */
57 public java.lang.String getName(
58 ) {
59 return this._name;
60 }
61
62 /**
63 * Method isValid.
64 *
65 * @return true if this object is valid according to the schema
66 */
67 public boolean isValid(
68 ) {
69 try {
70 validate();
71 } catch (org.exolab.castor.xml.ValidationException vex) {
72 return false;
73 }
74 return true;
75 }
76
77 /**
78 *
79 *
80 * @param out
81 * @throws org.exolab.castor.xml.MarshalException if object is
82 * null or if any SAXException is thrown during marshaling
83 * @throws org.exolab.castor.xml.ValidationException if this
84 * object is an invalid instance according to the schema
85 */
86 public void marshal(
87 final java.io.Writer out)
88 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
89 org.exolab.castor.xml.Marshaller.marshal(this, out);
90 }
91
92 /**
93 *
94 *
95 * @param handler
96 * @throws java.io.IOException if an IOException occurs during
97 * marshaling
98 * @throws org.exolab.castor.xml.ValidationException if this
99 * object is an invalid instance according to the schema
100 * @throws org.exolab.castor.xml.MarshalException if object is
101 * null or if any SAXException is thrown during marshaling
102 */
103 public void marshal(
104 final org.xml.sax.ContentHandler handler)
105 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
106 org.exolab.castor.xml.Marshaller.marshal(this, handler);
107 }
108
109 /**
110 * Sets the value of field 'name'. The field 'name' has the
111 * following description: The name attribute specifies the name
112 * of
113 * the column that represents this
114 * relation.
115 *
116 *
117 * @param name the value of field 'name'.
118 */
119 public void setName(
120 final java.lang.String name) {
121 this._name = name;
122 }
123
124 /**
125 * Method unmarshal.
126 *
127 * @param reader
128 * @throws org.exolab.castor.xml.MarshalException if object is
129 * null or if any SAXException is thrown during marshaling
130 * @throws org.exolab.castor.xml.ValidationException if this
131 * object is an invalid instance according to the schema
132 * @return the unmarshaled
133 * org.exolab.castor.xml.schema.annotations.jdo.OneToMany
134 */
135 public static org.exolab.castor.xml.schema.annotations.jdo.OneToMany unmarshal(
136 final java.io.Reader reader)
137 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
138 return (org.exolab.castor.xml.schema.annotations.jdo.OneToMany) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.OneToMany.class, reader);
139 }
140
141 /**
142 *
143 *
144 * @throws org.exolab.castor.xml.ValidationException if this
145 * object is an invalid instance according to the schema
146 */
147 public void validate(
148 )
149 throws org.exolab.castor.xml.ValidationException {
150 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
151 validator.validate(this);
152 }
153
154 }