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 ProviderChoiceDescriptor 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 ProviderChoiceDescriptor() { 51 super(); 52 53 //-- set grouping compositor 54 setCompositorAsChoice(); 55 XMLFieldDescriptorImpl desc = null; 56 XMLFieldHandler handler = null; 57 FieldValidator fieldValidator = null; 58 //-- initialize attribute descriptors 59 60 //-- initialize element descriptors 61 62 //-- _driver 63 desc = new XMLFieldDescriptorImpl(Driver.class, "_driver", "driver", NodeType.Element); 64 handler = (new XMLFieldHandler() { 65 public java.lang.Object getValue( java.lang.Object object ) 66 throws IllegalStateException 67 { 68 ProviderChoice target = (ProviderChoice) object; 69 return target.getDriver(); 70 } 71 public void setValue( java.lang.Object object, java.lang.Object value) 72 throws IllegalStateException, IllegalArgumentException 73 { 74 try { 75 ProviderChoice target = (ProviderChoice) object; 76 target.setDriver( (Driver) value); 77 } 78 catch (Exception ex) { 79 throw new IllegalStateException(ex.toString()); 80 } 81 } 82 public java.lang.Object newInstance( java.lang.Object parent ) { 83 return new Driver(); 84 } 85 } ); 86 desc.setHandler(handler); 87 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 88 desc.setMultivalued(false); 89 addFieldDescriptor(desc); 90 91 //-- validation code for: _driver 92 fieldValidator = new FieldValidator(); 93 { //-- local scope 94 } 95 desc.setValidator(fieldValidator); 96 //-- _jdbc2DatasourceName 97 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_jdbc2DatasourceName", "jdbc2-datasource-name", NodeType.Element); 98 desc.setImmutable(true); 99 handler = (new XMLFieldHandler() { 100 public java.lang.Object getValue( java.lang.Object object ) 101 throws IllegalStateException 102 { 103 ProviderChoice target = (ProviderChoice) object; 104 return target.getJdbc2DatasourceName(); 105 } 106 public void setValue( java.lang.Object object, java.lang.Object value) 107 throws IllegalStateException, IllegalArgumentException 108 { 109 try { 110 ProviderChoice target = (ProviderChoice) object; 111 target.setJdbc2DatasourceName( (java.lang.String) value); 112 } 113 catch (Exception ex) { 114 throw new IllegalStateException(ex.toString()); 115 } 116 } 117 public java.lang.Object newInstance( java.lang.Object parent ) { 118 return null; 119 } 120 } ); 121 desc.setHandler(handler); 122 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 123 desc.setMultivalued(false); 124 addFieldDescriptor(desc); 125 126 //-- validation code for: _jdbc2DatasourceName 127 fieldValidator = new FieldValidator(); 128 { //-- local scope 129 StringValidator typeValidator = new StringValidator(); 130 typeValidator.setWhiteSpace("preserve"); 131 fieldValidator.setValidator(typeValidator); 132 } 133 desc.setValidator(fieldValidator); 134 } //-- org.enableit.db.beans.ProviderChoiceDescriptor() 135 136 137 //-----------/ 138 //- Methods -/ 139 //-----------/ 140 141 /*** 142 **/ 143 public org.exolab.castor.mapping.AccessMode getAccessMode() 144 { 145 return null; 146 } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 147 148 /*** 149 **/ 150 public org.exolab.castor.mapping.ClassDescriptor getExtends() 151 { 152 return null; 153 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 154 155 /*** 156 **/ 157 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 158 { 159 return identity; 160 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 161 162 /*** 163 **/ 164 public java.lang.Class getJavaClass() 165 { 166 return org.enableit.db.beans.ProviderChoice.class; 167 } //-- java.lang.Class getJavaClass() 168 169 /*** 170 **/ 171 public java.lang.String getNameSpacePrefix() 172 { 173 return nsPrefix; 174 } //-- java.lang.String getNameSpacePrefix() 175 176 /*** 177 **/ 178 public java.lang.String getNameSpaceURI() 179 { 180 return nsURI; 181 } //-- java.lang.String getNameSpaceURI() 182 183 /*** 184 **/ 185 public org.exolab.castor.xml.TypeValidator getValidator() 186 { 187 return this; 188 } //-- org.exolab.castor.xml.TypeValidator getValidator() 189 190 /*** 191 **/ 192 public java.lang.String getXMLName() 193 { 194 return xmlName; 195 } //-- java.lang.String getXMLName() 196 197 }

This page was automatically generated by Maven