1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType; 15 import java.io.IOException ; 16 import java.io.Reader ; 17 import java.io.Serializable ; 18 import java.io.Writer ; 19 import org.exolab.castor.xml.MarshalException; 20 import org.exolab.castor.xml.Marshaller; 21 import org.exolab.castor.xml.Unmarshaller; 22 import org.exolab.castor.xml.ValidationException; 23 import org.xml.sax.ContentHandler ; 24 25 30 public class ParameterValue implements java.io.Serializable { 31 32 33 37 40 private java.lang.String _filterDefinitionName; 41 42 45 private com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType _filterParameter; 46 47 50 private java.lang.String _defaultValue; 51 52 53 57 public ParameterValue() { 58 super(); 59 } 61 62 66 72 public java.lang.String getDefaultValue() 73 { 74 return this._defaultValue; 75 } 77 83 public java.lang.String getFilterDefinitionName() 84 { 85 return this._filterDefinitionName; 86 } 88 94 public com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType getFilterParameter() 95 { 96 return this._filterParameter; 97 } 99 102 public boolean isValid() 103 { 104 try { 105 validate(); 106 } 107 catch (org.exolab.castor.xml.ValidationException vex) { 108 return false; 109 } 110 return true; 111 } 113 118 public void marshal(java.io.Writer out) 119 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 120 { 121 122 Marshaller.marshal(this, out); 123 } 125 130 public void marshal(org.xml.sax.ContentHandler handler) 131 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 132 { 133 134 Marshaller.marshal(this, handler); 135 } 137 143 public void setDefaultValue(java.lang.String defaultValue) 144 { 145 this._defaultValue = defaultValue; 146 } 148 155 public void setFilterDefinitionName(java.lang.String filterDefinitionName) 156 { 157 this._filterDefinitionName = filterDefinitionName; 158 } 160 166 public void setFilterParameter(com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType filterParameter) 167 { 168 this._filterParameter = filterParameter; 169 } 171 176 public static com.calipso.reportgenerator.reportdefinitions.ParameterValue unmarshal(java.io.Reader reader) 177 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 178 { 179 return (com.calipso.reportgenerator.reportdefinitions.ParameterValue) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.ParameterValue.class, reader); 180 } 182 185 public void validate() 186 throws org.exolab.castor.xml.ValidationException 187 { 188 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 189 validator.validate(this); 190 } 192 } 193 | Popular Tags |