1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an
4 * XML Schema.
5 * $Id$
6 */
7
8 package org.enableit.db.beans;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.mapping.ClassDescriptor;
16 import org.exolab.castor.mapping.FieldDescriptor;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.FieldValidator;
19 import org.exolab.castor.xml.TypeValidator;
20 import org.exolab.castor.xml.XMLFieldDescriptor;
21 import org.exolab.castor.xml.handlers.*;
22 import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
23 import org.exolab.castor.xml.validators.*;
24
25 /***
26 *
27 *
28 * @version $Revision$ $Date$
29 **/
30 public class ForeignKeyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
31
32
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
36
37 private java.lang.String nsPrefix;
38
39 private java.lang.String nsURI;
40
41 private java.lang.String xmlName;
42
43 private org.exolab.castor.xml.XMLFieldDescriptor identity;
44
45
46 //----------------/
47 //- Constructors -/
48 //----------------/
49
50 public ForeignKeyDescriptor() {
51 super();
52 nsURI = "http://darrt.sourceforge.net/schemas/darrt";
53 xmlName = "foreign-key";
54
55 //-- set grouping compositor
56 setCompositorAsSequence();
57 XMLFieldDescriptorImpl desc = null;
58 XMLFieldHandler handler = null;
59 FieldValidator fieldValidator = null;
60 //-- initialize attribute descriptors
61
62 //-- initialize element descriptors
63
64 //-- _fkTableName
65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_fkTableName", "fk-table-name", NodeType.Element);
66 desc.setImmutable(true);
67 handler = (new XMLFieldHandler() {
68 public java.lang.Object getValue( java.lang.Object object )
69 throws IllegalStateException
70 {
71 ForeignKey target = (ForeignKey) object;
72 return target.getFkTableName();
73 }
74 public void setValue( java.lang.Object object, java.lang.Object value)
75 throws IllegalStateException, IllegalArgumentException
76 {
77 try {
78 ForeignKey target = (ForeignKey) object;
79 target.setFkTableName( (java.lang.String) value);
80 }
81 catch (Exception ex) {
82 throw new IllegalStateException(ex.toString());
83 }
84 }
85 public java.lang.Object newInstance( java.lang.Object parent ) {
86 return null;
87 }
88 } );
89 desc.setHandler(handler);
90 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
91 desc.setRequired(true);
92 desc.setMultivalued(false);
93 addFieldDescriptor(desc);
94
95 //-- validation code for: _fkTableName
96 fieldValidator = new FieldValidator();
97 fieldValidator.setMinOccurs(1);
98 { //-- local scope
99 StringValidator typeValidator = new StringValidator();
100 typeValidator.setWhiteSpace("preserve");
101 fieldValidator.setValidator(typeValidator);
102 }
103 desc.setValidator(fieldValidator);
104 //-- _dataColumn
105 desc = new XMLFieldDescriptorImpl(DataColumn.class, "_dataColumn", "data-column", NodeType.Element);
106 handler = (new XMLFieldHandler() {
107 public java.lang.Object getValue( java.lang.Object object )
108 throws IllegalStateException
109 {
110 ForeignKey target = (ForeignKey) object;
111 return target.getDataColumn();
112 }
113 public void setValue( java.lang.Object object, java.lang.Object value)
114 throws IllegalStateException, IllegalArgumentException
115 {
116 try {
117 ForeignKey target = (ForeignKey) object;
118 target.setDataColumn( (DataColumn) value);
119 }
120 catch (Exception ex) {
121 throw new IllegalStateException(ex.toString());
122 }
123 }
124 public java.lang.Object newInstance( java.lang.Object parent ) {
125 return new DataColumn();
126 }
127 } );
128 desc.setHandler(handler);
129 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
130 desc.setRequired(true);
131 desc.setMultivalued(false);
132 addFieldDescriptor(desc);
133
134 //-- validation code for: _dataColumn
135 fieldValidator = new FieldValidator();
136 fieldValidator.setMinOccurs(1);
137 { //-- local scope
138 }
139 desc.setValidator(fieldValidator);
140 //-- _displayColumn
141 desc = new XMLFieldDescriptorImpl(DisplayColumn.class, "_displayColumn", "display-column", NodeType.Element);
142 handler = (new XMLFieldHandler() {
143 public java.lang.Object getValue( java.lang.Object object )
144 throws IllegalStateException
145 {
146 ForeignKey target = (ForeignKey) object;
147 return target.getDisplayColumn();
148 }
149 public void setValue( java.lang.Object object, java.lang.Object value)
150 throws IllegalStateException, IllegalArgumentException
151 {
152 try {
153 ForeignKey target = (ForeignKey) object;
154 target.setDisplayColumn( (DisplayColumn) value);
155 }
156 catch (Exception ex) {
157 throw new IllegalStateException(ex.toString());
158 }
159 }
160 public java.lang.Object newInstance( java.lang.Object parent ) {
161 return new DisplayColumn();
162 }
163 } );
164 desc.setHandler(handler);
165 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
166 desc.setRequired(true);
167 desc.setMultivalued(false);
168 addFieldDescriptor(desc);
169
170 //-- validation code for: _displayColumn
171 fieldValidator = new FieldValidator();
172 fieldValidator.setMinOccurs(1);
173 { //-- local scope
174 }
175 desc.setValidator(fieldValidator);
176 } //-- org.enableit.db.beans.ForeignKeyDescriptor()
177
178
179 //-----------/
180 //- Methods -/
181 //-----------/
182
183 /***
184 **/
185 public org.exolab.castor.mapping.AccessMode getAccessMode()
186 {
187 return null;
188 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
189
190 /***
191 **/
192 public org.exolab.castor.mapping.ClassDescriptor getExtends()
193 {
194 return null;
195 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
196
197 /***
198 **/
199 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
200 {
201 return identity;
202 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
203
204 /***
205 **/
206 public java.lang.Class getJavaClass()
207 {
208 return org.enableit.db.beans.ForeignKey.class;
209 } //-- java.lang.Class getJavaClass()
210
211 /***
212 **/
213 public java.lang.String getNameSpacePrefix()
214 {
215 return nsPrefix;
216 } //-- java.lang.String getNameSpacePrefix()
217
218 /***
219 **/
220 public java.lang.String getNameSpaceURI()
221 {
222 return nsURI;
223 } //-- java.lang.String getNameSpaceURI()
224
225 /***
226 **/
227 public org.exolab.castor.xml.TypeValidator getValidator()
228 {
229 return this;
230 } //-- org.exolab.castor.xml.TypeValidator getValidator()
231
232 /***
233 **/
234 public java.lang.String getXMLName()
235 {
236 return xmlName;
237 } //-- java.lang.String getXMLName()
238
239 }
This page was automatically generated by Maven