View Javadoc
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 DriverDescriptor 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 DriverDescriptor() { 51 super(); 52 nsURI = "http://darrt.sourceforge.net/schemas/darrt"; 53 xmlName = "driver"; 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 //-- _name 65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "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 Driver target = (Driver) object; 72 return target.getName(); 73 } 74 public void setValue( java.lang.Object object, java.lang.Object value) 75 throws IllegalStateException, IllegalArgumentException 76 { 77 try { 78 Driver target = (Driver) object; 79 target.setName( (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.setMultivalued(false); 92 addFieldDescriptor(desc); 93 94 //-- validation code for: _name 95 fieldValidator = new FieldValidator(); 96 { //-- local scope 97 StringValidator typeValidator = new StringValidator(); 98 typeValidator.setWhiteSpace("preserve"); 99 fieldValidator.setValidator(typeValidator); 100 } 101 desc.setValidator(fieldValidator); 102 //-- _version 103 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", NodeType.Element); 104 desc.setImmutable(true); 105 handler = (new XMLFieldHandler() { 106 public java.lang.Object getValue( java.lang.Object object ) 107 throws IllegalStateException 108 { 109 Driver target = (Driver) object; 110 return target.getVersion(); 111 } 112 public void setValue( java.lang.Object object, java.lang.Object value) 113 throws IllegalStateException, IllegalArgumentException 114 { 115 try { 116 Driver target = (Driver) object; 117 target.setVersion( (java.lang.String) value); 118 } 119 catch (Exception ex) { 120 throw new IllegalStateException(ex.toString()); 121 } 122 } 123 public java.lang.Object newInstance( java.lang.Object parent ) { 124 return null; 125 } 126 } ); 127 desc.setHandler(handler); 128 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 129 desc.setMultivalued(false); 130 addFieldDescriptor(desc); 131 132 //-- validation code for: _version 133 fieldValidator = new FieldValidator(); 134 { //-- local scope 135 StringValidator typeValidator = new StringValidator(); 136 typeValidator.setWhiteSpace("preserve"); 137 fieldValidator.setValidator(typeValidator); 138 } 139 desc.setValidator(fieldValidator); 140 //-- _className 141 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_className", "class-name", NodeType.Element); 142 desc.setImmutable(true); 143 handler = (new XMLFieldHandler() { 144 public java.lang.Object getValue( java.lang.Object object ) 145 throws IllegalStateException 146 { 147 Driver target = (Driver) object; 148 return target.getClassName(); 149 } 150 public void setValue( java.lang.Object object, java.lang.Object value) 151 throws IllegalStateException, IllegalArgumentException 152 { 153 try { 154 Driver target = (Driver) object; 155 target.setClassName( (java.lang.String) value); 156 } 157 catch (Exception ex) { 158 throw new IllegalStateException(ex.toString()); 159 } 160 } 161 public java.lang.Object newInstance( java.lang.Object parent ) { 162 return null; 163 } 164 } ); 165 desc.setHandler(handler); 166 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 167 desc.setMultivalued(false); 168 addFieldDescriptor(desc); 169 170 //-- validation code for: _className 171 fieldValidator = new FieldValidator(); 172 { //-- local scope 173 StringValidator typeValidator = new StringValidator(); 174 typeValidator.setWhiteSpace("preserve"); 175 fieldValidator.setValidator(typeValidator); 176 } 177 desc.setValidator(fieldValidator); 178 //-- _url 179 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_url", "url", NodeType.Element); 180 desc.setImmutable(true); 181 handler = (new XMLFieldHandler() { 182 public java.lang.Object getValue( java.lang.Object object ) 183 throws IllegalStateException 184 { 185 Driver target = (Driver) object; 186 return target.getUrl(); 187 } 188 public void setValue( java.lang.Object object, java.lang.Object value) 189 throws IllegalStateException, IllegalArgumentException 190 { 191 try { 192 Driver target = (Driver) object; 193 target.setUrl( (java.lang.String) value); 194 } 195 catch (Exception ex) { 196 throw new IllegalStateException(ex.toString()); 197 } 198 } 199 public java.lang.Object newInstance( java.lang.Object parent ) { 200 return null; 201 } 202 } ); 203 desc.setHandler(handler); 204 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 205 desc.setMultivalued(false); 206 addFieldDescriptor(desc); 207 208 //-- validation code for: _url 209 fieldValidator = new FieldValidator(); 210 { //-- local scope 211 StringValidator typeValidator = new StringValidator(); 212 typeValidator.setWhiteSpace("preserve"); 213 fieldValidator.setValidator(typeValidator); 214 } 215 desc.setValidator(fieldValidator); 216 //-- _username 217 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_username", "username", NodeType.Element); 218 desc.setImmutable(true); 219 handler = (new XMLFieldHandler() { 220 public java.lang.Object getValue( java.lang.Object object ) 221 throws IllegalStateException 222 { 223 Driver target = (Driver) object; 224 return target.getUsername(); 225 } 226 public void setValue( java.lang.Object object, java.lang.Object value) 227 throws IllegalStateException, IllegalArgumentException 228 { 229 try { 230 Driver target = (Driver) object; 231 target.setUsername( (java.lang.String) value); 232 } 233 catch (Exception ex) { 234 throw new IllegalStateException(ex.toString()); 235 } 236 } 237 public java.lang.Object newInstance( java.lang.Object parent ) { 238 return null; 239 } 240 } ); 241 desc.setHandler(handler); 242 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 243 desc.setMultivalued(false); 244 addFieldDescriptor(desc); 245 246 //-- validation code for: _username 247 fieldValidator = new FieldValidator(); 248 { //-- local scope 249 StringValidator typeValidator = new StringValidator(); 250 typeValidator.setWhiteSpace("preserve"); 251 fieldValidator.setValidator(typeValidator); 252 } 253 desc.setValidator(fieldValidator); 254 //-- _password 255 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_password", "password", NodeType.Element); 256 desc.setImmutable(true); 257 handler = (new XMLFieldHandler() { 258 public java.lang.Object getValue( java.lang.Object object ) 259 throws IllegalStateException 260 { 261 Driver target = (Driver) object; 262 return target.getPassword(); 263 } 264 public void setValue( java.lang.Object object, java.lang.Object value) 265 throws IllegalStateException, IllegalArgumentException 266 { 267 try { 268 Driver target = (Driver) object; 269 target.setPassword( (java.lang.String) value); 270 } 271 catch (Exception ex) { 272 throw new IllegalStateException(ex.toString()); 273 } 274 } 275 public java.lang.Object newInstance( java.lang.Object parent ) { 276 return null; 277 } 278 } ); 279 desc.setHandler(handler); 280 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 281 desc.setMultivalued(false); 282 addFieldDescriptor(desc); 283 284 //-- validation code for: _password 285 fieldValidator = new FieldValidator(); 286 { //-- local scope 287 StringValidator typeValidator = new StringValidator(); 288 typeValidator.setWhiteSpace("preserve"); 289 fieldValidator.setValidator(typeValidator); 290 } 291 desc.setValidator(fieldValidator); 292 } //-- org.enableit.db.beans.DriverDescriptor() 293 294 295 //-----------/ 296 //- Methods -/ 297 //-----------/ 298 299 /*** 300 **/ 301 public org.exolab.castor.mapping.AccessMode getAccessMode() 302 { 303 return null; 304 } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 305 306 /*** 307 **/ 308 public org.exolab.castor.mapping.ClassDescriptor getExtends() 309 { 310 return null; 311 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 312 313 /*** 314 **/ 315 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 316 { 317 return identity; 318 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 319 320 /*** 321 **/ 322 public java.lang.Class getJavaClass() 323 { 324 return org.enableit.db.beans.Driver.class; 325 } //-- java.lang.Class getJavaClass() 326 327 /*** 328 **/ 329 public java.lang.String getNameSpacePrefix() 330 { 331 return nsPrefix; 332 } //-- java.lang.String getNameSpacePrefix() 333 334 /*** 335 **/ 336 public java.lang.String getNameSpaceURI() 337 { 338 return nsURI; 339 } //-- java.lang.String getNameSpaceURI() 340 341 /*** 342 **/ 343 public org.exolab.castor.xml.TypeValidator getValidator() 344 { 345 return this; 346 } //-- org.exolab.castor.xml.TypeValidator getValidator() 347 348 /*** 349 **/ 350 public java.lang.String getXMLName() 351 { 352 return xmlName; 353 } //-- java.lang.String getXMLName() 354 355 }

This page was automatically generated by Maven