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 IndexDescriptor 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 IndexDescriptor() { 51 super(); 52 nsURI = "http://darrt.sourceforge.net/schemas/darrt"; 53 xmlName = "index"; 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 //-- _tableName 65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_tableName", "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 Index target = (Index) object; 72 return target.getTableName(); 73 } 74 public void setValue( java.lang.Object object, java.lang.Object value) 75 throws IllegalStateException, IllegalArgumentException 76 { 77 try { 78 Index target = (Index) object; 79 target.setTableName( (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: _tableName 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 //-- _name 103 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 Index target = (Index) object; 110 return target.getName(); 111 } 112 public void setValue( java.lang.Object object, java.lang.Object value) 113 throws IllegalStateException, IllegalArgumentException 114 { 115 try { 116 Index target = (Index) object; 117 target.setName( (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.setRequired(true); 130 desc.setMultivalued(false); 131 addFieldDescriptor(desc); 132 133 //-- validation code for: _name 134 fieldValidator = new FieldValidator(); 135 fieldValidator.setMinOccurs(1); 136 { //-- local scope 137 StringValidator typeValidator = new StringValidator(); 138 typeValidator.setWhiteSpace("preserve"); 139 fieldValidator.setValidator(typeValidator); 140 } 141 desc.setValidator(fieldValidator); 142 //-- _type 143 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", NodeType.Element); 144 desc.setImmutable(true); 145 handler = (new XMLFieldHandler() { 146 public java.lang.Object getValue( java.lang.Object object ) 147 throws IllegalStateException 148 { 149 Index target = (Index) object; 150 return target.getType(); 151 } 152 public void setValue( java.lang.Object object, java.lang.Object value) 153 throws IllegalStateException, IllegalArgumentException 154 { 155 try { 156 Index target = (Index) object; 157 target.setType( (java.lang.String) value); 158 } 159 catch (Exception ex) { 160 throw new IllegalStateException(ex.toString()); 161 } 162 } 163 public java.lang.Object newInstance( java.lang.Object parent ) { 164 return null; 165 } 166 } ); 167 desc.setHandler(handler); 168 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 169 desc.setRequired(true); 170 desc.setMultivalued(false); 171 addFieldDescriptor(desc); 172 173 //-- validation code for: _type 174 fieldValidator = new FieldValidator(); 175 fieldValidator.setMinOccurs(1); 176 { //-- local scope 177 StringValidator typeValidator = new StringValidator(); 178 typeValidator.setWhiteSpace("preserve"); 179 fieldValidator.setValidator(typeValidator); 180 } 181 desc.setValidator(fieldValidator); 182 //-- _unique 183 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_unique", "unique", NodeType.Element); 184 desc.setImmutable(true); 185 handler = (new XMLFieldHandler() { 186 public java.lang.Object getValue( java.lang.Object object ) 187 throws IllegalStateException 188 { 189 Index target = (Index) object; 190 return target.getUnique(); 191 } 192 public void setValue( java.lang.Object object, java.lang.Object value) 193 throws IllegalStateException, IllegalArgumentException 194 { 195 try { 196 Index target = (Index) object; 197 target.setUnique( (java.lang.String) value); 198 } 199 catch (Exception ex) { 200 throw new IllegalStateException(ex.toString()); 201 } 202 } 203 public java.lang.Object newInstance( java.lang.Object parent ) { 204 return null; 205 } 206 } ); 207 desc.setHandler(handler); 208 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 209 desc.setRequired(true); 210 desc.setMultivalued(false); 211 addFieldDescriptor(desc); 212 213 //-- validation code for: _unique 214 fieldValidator = new FieldValidator(); 215 fieldValidator.setMinOccurs(1); 216 { //-- local scope 217 StringValidator typeValidator = new StringValidator(); 218 typeValidator.setWhiteSpace("preserve"); 219 fieldValidator.setValidator(typeValidator); 220 } 221 desc.setValidator(fieldValidator); 222 //-- _colNameList 223 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_colNameList", "col-name", NodeType.Element); 224 desc.setImmutable(true); 225 handler = (new XMLFieldHandler() { 226 public java.lang.Object getValue( java.lang.Object object ) 227 throws IllegalStateException 228 { 229 Index target = (Index) object; 230 return target.getColName(); 231 } 232 public void setValue( java.lang.Object object, java.lang.Object value) 233 throws IllegalStateException, IllegalArgumentException 234 { 235 try { 236 Index target = (Index) object; 237 target.addColName( (java.lang.String) value); 238 } 239 catch (Exception ex) { 240 throw new IllegalStateException(ex.toString()); 241 } 242 } 243 public java.lang.Object newInstance( java.lang.Object parent ) { 244 return null; 245 } 246 } ); 247 desc.setHandler(handler); 248 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 249 desc.setRequired(true); 250 desc.setMultivalued(true); 251 addFieldDescriptor(desc); 252 253 //-- validation code for: _colNameList 254 fieldValidator = new FieldValidator(); 255 fieldValidator.setMinOccurs(1); 256 { //-- local scope 257 StringValidator typeValidator = new StringValidator(); 258 typeValidator.setWhiteSpace("preserve"); 259 fieldValidator.setValidator(typeValidator); 260 } 261 desc.setValidator(fieldValidator); 262 } //-- org.enableit.db.beans.IndexDescriptor() 263 264 265 //-----------/ 266 //- Methods -/ 267 //-----------/ 268 269 /*** 270 **/ 271 public org.exolab.castor.mapping.AccessMode getAccessMode() 272 { 273 return null; 274 } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 275 276 /*** 277 **/ 278 public org.exolab.castor.mapping.ClassDescriptor getExtends() 279 { 280 return null; 281 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 282 283 /*** 284 **/ 285 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 286 { 287 return identity; 288 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 289 290 /*** 291 **/ 292 public java.lang.Class getJavaClass() 293 { 294 return org.enableit.db.beans.Index.class; 295 } //-- java.lang.Class getJavaClass() 296 297 /*** 298 **/ 299 public java.lang.String getNameSpacePrefix() 300 { 301 return nsPrefix; 302 } //-- java.lang.String getNameSpacePrefix() 303 304 /*** 305 **/ 306 public java.lang.String getNameSpaceURI() 307 { 308 return nsURI; 309 } //-- java.lang.String getNameSpaceURI() 310 311 /*** 312 **/ 313 public org.exolab.castor.xml.TypeValidator getValidator() 314 { 315 return this; 316 } //-- org.exolab.castor.xml.TypeValidator getValidator() 317 318 /*** 319 **/ 320 public java.lang.String getXMLName() 321 { 322 return xmlName; 323 } //-- java.lang.String getXMLName() 324 325 }

This page was automatically generated by Maven