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