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 DimensionDefinitionDescriptor 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 DimensionDefinitionDescriptor() { 57 super(); 58 xmlName = "DimensionDefinition"; 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 DimensionDefinition target = (DimensionDefinition) 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 DimensionDefinition target = (DimensionDefinition) 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 DimensionDefinition target = (DimensionDefinition) 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 DimensionDefinition target = (DimensionDefinition) 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 addFieldDescriptor(desc); 129 130 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 132 { StringValidator typeValidator = new StringValidator(); 134 typeValidator.setWhiteSpace("preserve"); 135 fieldValidator.setValidator(typeValidator); 136 } 137 desc.setValidator(fieldValidator); 138 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class, "_location", "Location", org.exolab.castor.xml.NodeType.Attribute); 140 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 141 public java.lang.Object getValue( java.lang.Object object ) 142 throws IllegalStateException 143 { 144 DimensionDefinition target = (DimensionDefinition) object; 145 return target.getLocation(); 146 } 147 public void setValue( java.lang.Object object, java.lang.Object value) 148 throws IllegalStateException , IllegalArgumentException 149 { 150 try { 151 DimensionDefinition target = (DimensionDefinition) object; 152 target.setLocation( (com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType) value); 153 } 154 catch (java.lang.Exception ex) { 155 throw new IllegalStateException (ex.toString()); 156 } 157 } 158 public java.lang.Object newInstance( java.lang.Object parent ) { 159 return null; 160 } 161 } ); 162 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class, handler)); 163 desc.setImmutable(true); 164 desc.setRequired(true); 165 addFieldDescriptor(desc); 166 167 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 169 fieldValidator.setMinOccurs(1); 170 { } 172 desc.setValidator(fieldValidator); 173 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_groups", "Groups", 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 DimensionDefinition target = (DimensionDefinition) object; 180 if(!target.hasGroups()) 181 return null; 182 return new Boolean (target.getGroups()); 183 } 184 public void setValue( java.lang.Object object, java.lang.Object value) 185 throws IllegalStateException , IllegalArgumentException 186 { 187 try { 188 DimensionDefinition target = (DimensionDefinition) object; 189 if (value == null) { 191 target.deleteGroups(); 192 return; 193 } 194 target.setGroups( ((Boolean )value).booleanValue()); 195 } 196 catch (java.lang.Exception ex) { 197 throw new IllegalStateException (ex.toString()); 198 } 199 } 200 public java.lang.Object newInstance( java.lang.Object parent ) { 201 return null; 202 } 203 } ); 204 desc.setHandler(handler); 205 addFieldDescriptor(desc); 206 207 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 209 { BooleanValidator typeValidator = new BooleanValidator(); 211 fieldValidator.setValidator(typeValidator); 212 } 213 desc.setValidator(fieldValidator); 214 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_groupFooterCaption", "GroupFooterCaption", org.exolab.castor.xml.NodeType.Attribute); 216 desc.setImmutable(true); 217 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 218 public java.lang.Object getValue( java.lang.Object object ) 219 throws IllegalStateException 220 { 221 DimensionDefinition target = (DimensionDefinition) object; 222 return target.getGroupFooterCaption(); 223 } 224 public void setValue( java.lang.Object object, java.lang.Object value) 225 throws IllegalStateException , IllegalArgumentException 226 { 227 try { 228 DimensionDefinition target = (DimensionDefinition) object; 229 target.setGroupFooterCaption( (java.lang.String ) value); 230 } 231 catch (java.lang.Exception ex) { 232 throw new IllegalStateException (ex.toString()); 233 } 234 } 235 public java.lang.Object newInstance( java.lang.Object parent ) { 236 return null; 237 } 238 } ); 239 desc.setHandler(handler); 240 addFieldDescriptor(desc); 241 242 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 244 { StringValidator typeValidator = new StringValidator(); 246 typeValidator.setWhiteSpace("preserve"); 247 fieldValidator.setValidator(typeValidator); 248 } 249 desc.setValidator(fieldValidator); 250 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class, "_order", "Order", org.exolab.castor.xml.NodeType.Attribute); 252 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 253 public java.lang.Object getValue( java.lang.Object object ) 254 throws IllegalStateException 255 { 256 DimensionDefinition target = (DimensionDefinition) object; 257 return target.getOrder(); 258 } 259 public void setValue( java.lang.Object object, java.lang.Object value) 260 throws IllegalStateException , IllegalArgumentException 261 { 262 try { 263 DimensionDefinition target = (DimensionDefinition) object; 264 target.setOrder( (com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType) value); 265 } 266 catch (java.lang.Exception ex) { 267 throw new IllegalStateException (ex.toString()); 268 } 269 } 270 public java.lang.Object newInstance( java.lang.Object parent ) { 271 return null; 272 } 273 } ); 274 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class, handler)); 275 desc.setImmutable(true); 276 addFieldDescriptor(desc); 277 278 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 280 { } 282 desc.setValidator(fieldValidator); 283 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_rankMetricName", "RankMetricName", 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 DimensionDefinition target = (DimensionDefinition) object; 291 return target.getRankMetricName(); 292 } 293 public void setValue( java.lang.Object object, java.lang.Object value) 294 throws IllegalStateException , IllegalArgumentException 295 { 296 try { 297 DimensionDefinition target = (DimensionDefinition) object; 298 target.setRankMetricName( (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 321 } 323 324 328 331 public org.exolab.castor.mapping.AccessMode getAccessMode() 332 { 333 return null; 334 } 336 339 public org.exolab.castor.mapping.ClassDescriptor getExtends() 340 { 341 return null; 342 } 344 347 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 348 { 349 return identity; 350 } 352 355 public java.lang.Class getJavaClass() 356 { 357 return com.calipso.reportgenerator.reportdefinitions.DimensionDefinition.class; 358 } 360 363 public java.lang.String getNameSpacePrefix() 364 { 365 return nsPrefix; 366 } 368 371 public java.lang.String getNameSpaceURI() 372 { 373 return nsURI; 374 } 376 379 public org.exolab.castor.xml.TypeValidator getValidator() 380 { 381 return this; 382 } 384 387 public java.lang.String getXMLName() 388 { 389 return xmlName; 390 } 392 } 393 | Popular Tags |