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 ViewDescriptor 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 ViewDescriptor() { 51 super(); 52 nsURI = "http://darrt.sourceforge.net/schemas/darrt"; 53 xmlName = "view"; 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 View target = (View) 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 View target = (View) 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.setRequired(true); 92 desc.setMultivalued(false); 93 addFieldDescriptor(desc); 94 95 //-- validation code for: _name 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 //-- _type 105 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", NodeType.Element); 106 desc.setImmutable(true); 107 handler = (new XMLFieldHandler() { 108 public java.lang.Object getValue( java.lang.Object object ) 109 throws IllegalStateException 110 { 111 View target = (View) object; 112 return target.getType(); 113 } 114 public void setValue( java.lang.Object object, java.lang.Object value) 115 throws IllegalStateException, IllegalArgumentException 116 { 117 try { 118 View target = (View) object; 119 target.setType( (java.lang.String) value); 120 } 121 catch (Exception ex) { 122 throw new IllegalStateException(ex.toString()); 123 } 124 } 125 public java.lang.Object newInstance( java.lang.Object parent ) { 126 return null; 127 } 128 } ); 129 desc.setHandler(handler); 130 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 131 desc.setRequired(true); 132 desc.setMultivalued(false); 133 addFieldDescriptor(desc); 134 135 //-- validation code for: _type 136 fieldValidator = new FieldValidator(); 137 fieldValidator.setMinOccurs(1); 138 { //-- local scope 139 StringValidator typeValidator = new StringValidator(); 140 typeValidator.setWhiteSpace("preserve"); 141 fieldValidator.setValidator(typeValidator); 142 } 143 desc.setValidator(fieldValidator); 144 //-- _columnList 145 desc = new XMLFieldDescriptorImpl(Column.class, "_columnList", "column", NodeType.Element); 146 handler = (new XMLFieldHandler() { 147 public java.lang.Object getValue( java.lang.Object object ) 148 throws IllegalStateException 149 { 150 View target = (View) object; 151 return target.getColumn(); 152 } 153 public void setValue( java.lang.Object object, java.lang.Object value) 154 throws IllegalStateException, IllegalArgumentException 155 { 156 try { 157 View target = (View) object; 158 target.addColumn( (Column) value); 159 } 160 catch (Exception ex) { 161 throw new IllegalStateException(ex.toString()); 162 } 163 } 164 public java.lang.Object newInstance( java.lang.Object parent ) { 165 return new Column(); 166 } 167 } ); 168 desc.setHandler(handler); 169 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 170 desc.setRequired(true); 171 desc.setMultivalued(true); 172 addFieldDescriptor(desc); 173 174 //-- validation code for: _columnList 175 fieldValidator = new FieldValidator(); 176 fieldValidator.setMinOccurs(1); 177 { //-- local scope 178 } 179 desc.setValidator(fieldValidator); 180 //-- _definition 181 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_definition", "definition", NodeType.Element); 182 desc.setImmutable(true); 183 handler = (new XMLFieldHandler() { 184 public java.lang.Object getValue( java.lang.Object object ) 185 throws IllegalStateException 186 { 187 View target = (View) object; 188 return target.getDefinition(); 189 } 190 public void setValue( java.lang.Object object, java.lang.Object value) 191 throws IllegalStateException, IllegalArgumentException 192 { 193 try { 194 View target = (View) object; 195 target.setDefinition( (java.lang.String) value); 196 } 197 catch (Exception ex) { 198 throw new IllegalStateException(ex.toString()); 199 } 200 } 201 public java.lang.Object newInstance( java.lang.Object parent ) { 202 return null; 203 } 204 } ); 205 desc.setHandler(handler); 206 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 207 desc.setRequired(true); 208 desc.setMultivalued(false); 209 addFieldDescriptor(desc); 210 211 //-- validation code for: _definition 212 fieldValidator = new FieldValidator(); 213 fieldValidator.setMinOccurs(1); 214 { //-- local scope 215 StringValidator typeValidator = new StringValidator(); 216 typeValidator.setWhiteSpace("preserve"); 217 fieldValidator.setValidator(typeValidator); 218 } 219 desc.setValidator(fieldValidator); 220 } //-- org.enableit.db.beans.ViewDescriptor() 221 222 223 //-----------/ 224 //- Methods -/ 225 //-----------/ 226 227 /*** 228 **/ 229 public org.exolab.castor.mapping.AccessMode getAccessMode() 230 { 231 return null; 232 } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 233 234 /*** 235 **/ 236 public org.exolab.castor.mapping.ClassDescriptor getExtends() 237 { 238 return null; 239 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 240 241 /*** 242 **/ 243 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 244 { 245 return identity; 246 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 247 248 /*** 249 **/ 250 public java.lang.Class getJavaClass() 251 { 252 return org.enableit.db.beans.View.class; 253 } //-- java.lang.Class getJavaClass() 254 255 /*** 256 **/ 257 public java.lang.String getNameSpacePrefix() 258 { 259 return nsPrefix; 260 } //-- java.lang.String getNameSpacePrefix() 261 262 /*** 263 **/ 264 public java.lang.String getNameSpaceURI() 265 { 266 return nsURI; 267 } //-- java.lang.String getNameSpaceURI() 268 269 /*** 270 **/ 271 public org.exolab.castor.xml.TypeValidator getValidator() 272 { 273 return this; 274 } //-- org.exolab.castor.xml.TypeValidator getValidator() 275 276 /*** 277 **/ 278 public java.lang.String getXMLName() 279 { 280 return xmlName; 281 } //-- java.lang.String getXMLName() 282 283 }

This page was automatically generated by Maven