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 MetricSourceDefinitionDescriptor 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 MetricSourceDefinitionDescriptor() { 57 super(); 58 xmlName = "MetricSourceDefinition"; 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 MetricSourceDefinition target = (MetricSourceDefinition) 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 MetricSourceDefinition target = (MetricSourceDefinition) 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 MetricSourceDefinition target = (MetricSourceDefinition) 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 MetricSourceDefinition target = (MetricSourceDefinition) 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.CalculationType.class, "_aggregateType", "AggregateType", 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 MetricSourceDefinition target = (MetricSourceDefinition) object; 147 return target.getAggregateType(); 148 } 149 public void setValue( java.lang.Object object, java.lang.Object value) 150 throws IllegalStateException , IllegalArgumentException 151 { 152 try { 153 MetricSourceDefinition target = (MetricSourceDefinition) object; 154 target.setAggregateType( (com.calipso.reportgenerator.reportdefinitions.types.CalculationType) 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.CalculationType.class, handler)); 165 desc.setImmutable(true); 166 addFieldDescriptor(desc); 167 168 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 170 { } 172 desc.setValidator(fieldValidator); 173 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, "_groupFooterType", "GroupFooterType", org.exolab.castor.xml.NodeType.Attribute); 175 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 176 public java.lang.Object getValue( java.lang.Object object ) 177 throws IllegalStateException 178 { 179 MetricSourceDefinition target = (MetricSourceDefinition) object; 180 return target.getGroupFooterType(); 181 } 182 public void setValue( java.lang.Object object, java.lang.Object value) 183 throws IllegalStateException , IllegalArgumentException 184 { 185 try { 186 MetricSourceDefinition target = (MetricSourceDefinition) object; 187 target.setGroupFooterType( (com.calipso.reportgenerator.reportdefinitions.types.CalculationType) value); 188 } 189 catch (java.lang.Exception ex) { 190 throw new IllegalStateException (ex.toString()); 191 } 192 } 193 public java.lang.Object newInstance( java.lang.Object parent ) { 194 return null; 195 } 196 } ); 197 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, handler)); 198 desc.setImmutable(true); 199 addFieldDescriptor(desc); 200 201 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 203 { } 205 desc.setValidator(fieldValidator); 206 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_calculated", "Calculated", org.exolab.castor.xml.NodeType.Attribute); 208 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 209 public java.lang.Object getValue( java.lang.Object object ) 210 throws IllegalStateException 211 { 212 MetricSourceDefinition target = (MetricSourceDefinition) object; 213 if(!target.hasCalculated()) 214 return null; 215 return new Boolean (target.getCalculated()); 216 } 217 public void setValue( java.lang.Object object, java.lang.Object value) 218 throws IllegalStateException , IllegalArgumentException 219 { 220 try { 221 MetricSourceDefinition target = (MetricSourceDefinition) object; 222 if (value == null) { 224 target.deleteCalculated(); 225 return; 226 } 227 target.setCalculated( ((Boolean )value).booleanValue()); 228 } 229 catch (java.lang.Exception ex) { 230 throw new IllegalStateException (ex.toString()); 231 } 232 } 233 public java.lang.Object newInstance( java.lang.Object parent ) { 234 return null; 235 } 236 } ); 237 desc.setHandler(handler); 238 addFieldDescriptor(desc); 239 240 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 242 { BooleanValidator typeValidator = new BooleanValidator(); 244 fieldValidator.setValidator(typeValidator); 245 } 246 desc.setValidator(fieldValidator); 247 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_aggregateFunction", "AggregateFunction", org.exolab.castor.xml.NodeType.Attribute); 249 desc.setImmutable(true); 250 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 251 public java.lang.Object getValue( java.lang.Object object ) 252 throws IllegalStateException 253 { 254 MetricSourceDefinition target = (MetricSourceDefinition) object; 255 return target.getAggregateFunction(); 256 } 257 public void setValue( java.lang.Object object, java.lang.Object value) 258 throws IllegalStateException , IllegalArgumentException 259 { 260 try { 261 MetricSourceDefinition target = (MetricSourceDefinition) object; 262 target.setAggregateFunction( (java.lang.String ) value); 263 } 264 catch (java.lang.Exception ex) { 265 throw new IllegalStateException (ex.toString()); 266 } 267 } 268 public java.lang.Object newInstance( java.lang.Object parent ) { 269 return null; 270 } 271 } ); 272 desc.setHandler(handler); 273 addFieldDescriptor(desc); 274 275 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 277 { StringValidator typeValidator = new StringValidator(); 279 typeValidator.setWhiteSpace("preserve"); 280 fieldValidator.setValidator(typeValidator); 281 } 282 desc.setValidator(fieldValidator); 283 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_groupFooterFunction", "GroupFooterFunction", org.exolab.castor.xml.NodeType.Attribute); 285 desc.setImmutable(true); 286 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 287 public java.lang.Object getValue( java.lang.Object object ) 288 throws IllegalStateException 289 { 290 MetricSourceDefinition target = (MetricSourceDefinition) object; 291 return target.getGroupFooterFunction(); 292 } 293 public void setValue( java.lang.Object object, java.lang.Object value) 294 throws IllegalStateException , IllegalArgumentException 295 { 296 try { 297 MetricSourceDefinition target = (MetricSourceDefinition) object; 298 target.setGroupFooterFunction( (java.lang.String ) value); 299 } 300 catch (java.lang.Exception ex) { 301 throw new IllegalStateException (ex.toString()); 302 } 303 } 304 public java.lang.Object newInstance( java.lang.Object parent ) { 305 return null; 306 } 307 } ); 308 desc.setHandler(handler); 309 addFieldDescriptor(desc); 310 311 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 313 { StringValidator typeValidator = new StringValidator(); 315 typeValidator.setWhiteSpace("preserve"); 316 fieldValidator.setValidator(typeValidator); 317 } 318 desc.setValidator(fieldValidator); 319 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_externalData", "ExternalData", org.exolab.castor.xml.NodeType.Attribute); 321 desc.setImmutable(true); 322 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 323 public java.lang.Object getValue( java.lang.Object object ) 324 throws IllegalStateException 325 { 326 MetricSourceDefinition target = (MetricSourceDefinition) object; 327 return target.getExternalData(); 328 } 329 public void setValue( java.lang.Object object, java.lang.Object value) 330 throws IllegalStateException , IllegalArgumentException 331 { 332 try { 333 MetricSourceDefinition target = (MetricSourceDefinition) object; 334 target.setExternalData( (java.lang.String ) value); 335 } 336 catch (java.lang.Exception ex) { 337 throw new IllegalStateException (ex.toString()); 338 } 339 } 340 public java.lang.Object newInstance( java.lang.Object parent ) { 341 return null; 342 } 343 } ); 344 desc.setHandler(handler); 345 addFieldDescriptor(desc); 346 347 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 349 { StringValidator typeValidator = new StringValidator(); 351 typeValidator.setWhiteSpace("preserve"); 352 fieldValidator.setValidator(typeValidator); 353 } 354 desc.setValidator(fieldValidator); 355 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_externalCalculated", "ExternalCalculated", org.exolab.castor.xml.NodeType.Attribute); 357 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 358 public java.lang.Object getValue( java.lang.Object object ) 359 throws IllegalStateException 360 { 361 MetricSourceDefinition target = (MetricSourceDefinition) object; 362 if(!target.hasExternalCalculated()) 363 return null; 364 return new Boolean (target.getExternalCalculated()); 365 } 366 public void setValue( java.lang.Object object, java.lang.Object value) 367 throws IllegalStateException , IllegalArgumentException 368 { 369 try { 370 MetricSourceDefinition target = (MetricSourceDefinition) object; 371 if (value == null) { 373 target.deleteExternalCalculated(); 374 return; 375 } 376 target.setExternalCalculated( ((Boolean )value).booleanValue()); 377 } 378 catch (java.lang.Exception ex) { 379 throw new IllegalStateException (ex.toString()); 380 } 381 } 382 public java.lang.Object newInstance( java.lang.Object parent ) { 383 return null; 384 } 385 } ); 386 desc.setHandler(handler); 387 addFieldDescriptor(desc); 388 389 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 391 { BooleanValidator typeValidator = new BooleanValidator(); 393 fieldValidator.setValidator(typeValidator); 394 } 395 desc.setValidator(fieldValidator); 396 398 } 400 401 405 408 public org.exolab.castor.mapping.AccessMode getAccessMode() 409 { 410 return null; 411 } 413 416 public org.exolab.castor.mapping.ClassDescriptor getExtends() 417 { 418 return null; 419 } 421 424 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 425 { 426 return identity; 427 } 429 432 public java.lang.Class getJavaClass() 433 { 434 return com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinition.class; 435 } 437 440 public java.lang.String getNameSpacePrefix() 441 { 442 return nsPrefix; 443 } 445 448 public java.lang.String getNameSpaceURI() 449 { 450 return nsURI; 451 } 453 456 public org.exolab.castor.xml.TypeValidator getValidator() 457 { 458 return this; 459 } 461 464 public java.lang.String getXMLName() 465 { 466 return xmlName; 467 } 469 } 470 | Popular Tags |