1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import org.exolab.castor.mapping.AccessMode; 15 import org.exolab.castor.xml.TypeValidator; 16 import org.exolab.castor.xml.XMLFieldDescriptor; 17 import org.exolab.castor.xml.validators.*; 18 19 24 public class DimensionSourceDefinitionDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { 25 26 27 31 34 private java.lang.String nsPrefix; 35 36 39 private java.lang.String nsURI; 40 41 44 private java.lang.String xmlName; 45 46 49 private org.exolab.castor.xml.XMLFieldDescriptor identity; 50 51 52 56 public DimensionSourceDefinitionDescriptor() { 57 super(); 58 xmlName = "DimensionSourceDefinition"; 59 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; 60 org.exolab.castor.xml.XMLFieldHandler handler = null; 61 org.exolab.castor.xml.FieldValidator fieldValidator = null; 62 64 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute); 66 desc.setImmutable(true); 67 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 68 public java.lang.Object getValue( java.lang.Object object ) 69 throws IllegalStateException 70 { 71 DimensionSourceDefinition target = (DimensionSourceDefinition) 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 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 79 target.setName( (java.lang.String ) value); 80 } 81 catch (java.lang.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.setRequired(true); 91 addFieldDescriptor(desc); 92 93 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 95 fieldValidator.setMinOccurs(1); 96 { StringValidator typeValidator = new StringValidator(); 98 typeValidator.setWhiteSpace("preserve"); 99 fieldValidator.setValidator(typeValidator); 100 } 101 desc.setValidator(fieldValidator); 102 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_description", "Description", org.exolab.castor.xml.NodeType.Attribute); 104 desc.setImmutable(true); 105 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 106 public java.lang.Object getValue( java.lang.Object object ) 107 throws IllegalStateException 108 { 109 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 110 return target.getDescription(); 111 } 112 public void setValue( java.lang.Object object, java.lang.Object value) 113 throws IllegalStateException , IllegalArgumentException 114 { 115 try { 116 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 117 target.setDescription( (java.lang.String ) value); 118 } 119 catch (java.lang.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.setRequired(true); 129 addFieldDescriptor(desc); 130 131 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 133 fieldValidator.setMinOccurs(1); 134 { StringValidator typeValidator = new StringValidator(); 136 typeValidator.setWhiteSpace("preserve"); 137 fieldValidator.setValidator(typeValidator); 138 } 139 desc.setValidator(fieldValidator); 140 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class, "_dataType", "DataType", org.exolab.castor.xml.NodeType.Attribute); 142 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 143 public java.lang.Object getValue( java.lang.Object object ) 144 throws IllegalStateException 145 { 146 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 147 return target.getDataType(); 148 } 149 public void setValue( java.lang.Object object, java.lang.Object value) 150 throws IllegalStateException , IllegalArgumentException 151 { 152 try { 153 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 154 target.setDataType( (com.calipso.reportgenerator.reportdefinitions.types.ReportDataType) value); 155 } 156 catch (java.lang.Exception ex) { 157 throw new IllegalStateException (ex.toString()); 158 } 159 } 160 public java.lang.Object newInstance( java.lang.Object parent ) { 161 return null; 162 } 163 } ); 164 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class, handler)); 165 desc.setImmutable(true); 166 desc.setRequired(true); 167 addFieldDescriptor(desc); 168 169 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 171 fieldValidator.setMinOccurs(1); 172 { } 174 desc.setValidator(fieldValidator); 175 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_calculated", "Calculated", org.exolab.castor.xml.NodeType.Attribute); 177 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 178 public java.lang.Object getValue( java.lang.Object object ) 179 throws IllegalStateException 180 { 181 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 182 if(!target.hasCalculated()) 183 return null; 184 return new Boolean (target.getCalculated()); 185 } 186 public void setValue( java.lang.Object object, java.lang.Object value) 187 throws IllegalStateException , IllegalArgumentException 188 { 189 try { 190 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 191 if (value == null) { 193 target.deleteCalculated(); 194 return; 195 } 196 target.setCalculated( ((Boolean )value).booleanValue()); 197 } 198 catch (java.lang.Exception ex) { 199 throw new IllegalStateException (ex.toString()); 200 } 201 } 202 public java.lang.Object newInstance( java.lang.Object parent ) { 203 return null; 204 } 205 } ); 206 desc.setHandler(handler); 207 addFieldDescriptor(desc); 208 209 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 211 { BooleanValidator typeValidator = new BooleanValidator(); 213 fieldValidator.setValidator(typeValidator); 214 } 215 desc.setValidator(fieldValidator); 216 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_expression", "Expression", org.exolab.castor.xml.NodeType.Attribute); 218 desc.setImmutable(true); 219 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 220 public java.lang.Object getValue( java.lang.Object object ) 221 throws IllegalStateException 222 { 223 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 224 return target.getExpression(); 225 } 226 public void setValue( java.lang.Object object, java.lang.Object value) 227 throws IllegalStateException , IllegalArgumentException 228 { 229 try { 230 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 231 target.setExpression( (java.lang.String ) value); 232 } 233 catch (java.lang.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 addFieldDescriptor(desc); 243 244 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 246 { StringValidator typeValidator = new StringValidator(); 248 typeValidator.setWhiteSpace("preserve"); 249 fieldValidator.setValidator(typeValidator); 250 } 251 desc.setValidator(fieldValidator); 252 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_externalData", "ExternalData", org.exolab.castor.xml.NodeType.Attribute); 254 desc.setImmutable(true); 255 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 256 public java.lang.Object getValue( java.lang.Object object ) 257 throws IllegalStateException 258 { 259 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 260 return target.getExternalData(); 261 } 262 public void setValue( java.lang.Object object, java.lang.Object value) 263 throws IllegalStateException , IllegalArgumentException 264 { 265 try { 266 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 267 target.setExternalData( (java.lang.String ) value); 268 } 269 catch (java.lang.Exception ex) { 270 throw new IllegalStateException (ex.toString()); 271 } 272 } 273 public java.lang.Object newInstance( java.lang.Object parent ) { 274 return null; 275 } 276 } ); 277 desc.setHandler(handler); 278 addFieldDescriptor(desc); 279 280 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 282 { StringValidator typeValidator = new StringValidator(); 284 typeValidator.setWhiteSpace("preserve"); 285 fieldValidator.setValidator(typeValidator); 286 } 287 desc.setValidator(fieldValidator); 288 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_indexed", "Indexed", org.exolab.castor.xml.NodeType.Attribute); 290 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 291 public java.lang.Object getValue( java.lang.Object object ) 292 throws IllegalStateException 293 { 294 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 295 if(!target.hasIndexed()) 296 return null; 297 return new Boolean (target.getIndexed()); 298 } 299 public void setValue( java.lang.Object object, java.lang.Object value) 300 throws IllegalStateException , IllegalArgumentException 301 { 302 try { 303 DimensionSourceDefinition target = (DimensionSourceDefinition) object; 304 if (value == null) { 306 target.deleteIndexed(); 307 return; 308 } 309 target.setIndexed( ((Boolean )value).booleanValue()); 310 } 311 catch (java.lang.Exception ex) { 312 throw new IllegalStateException (ex.toString()); 313 } 314 } 315 public java.lang.Object newInstance( java.lang.Object parent ) { 316 return null; 317 } 318 } ); 319 desc.setHandler(handler); 320 addFieldDescriptor(desc); 321 322 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 324 { BooleanValidator typeValidator = new BooleanValidator(); 326 fieldValidator.setValidator(typeValidator); 327 } 328 desc.setValidator(fieldValidator); 329 331 } 333 334 338 341 public org.exolab.castor.mapping.AccessMode getAccessMode() 342 { 343 return null; 344 } 346 349 public org.exolab.castor.mapping.ClassDescriptor getExtends() 350 { 351 return null; 352 } 354 357 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 358 { 359 return identity; 360 } 362 365 public java.lang.Class getJavaClass() 366 { 367 return com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition.class; 368 } 370 373 public java.lang.String getNameSpacePrefix() 374 { 375 return nsPrefix; 376 } 378 381 public java.lang.String getNameSpaceURI() 382 { 383 return nsURI; 384 } 386 389 public org.exolab.castor.xml.TypeValidator getValidator() 390 { 391 return this; 392 } 394 397 public java.lang.String getXMLName() 398 { 399 return xmlName; 400 } 402 } 403 | Popular Tags |