001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import org.exolab.castor.mapping.AccessMode;
015: import org.exolab.castor.xml.TypeValidator;
016: import org.exolab.castor.xml.XMLFieldDescriptor;
017: import org.exolab.castor.xml.validators.*;
018:
019: /**
020: * Class ParameterValueDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class ParameterValueDescriptor extends
025: org.exolab.castor.xml.util.XMLClassDescriptorImpl {
026:
027: //--------------------------/
028: //- Class/Member Variables -/
029: //--------------------------/
030:
031: /**
032: * Field nsPrefix
033: */
034: private java.lang.String nsPrefix;
035:
036: /**
037: * Field nsURI
038: */
039: private java.lang.String nsURI;
040:
041: /**
042: * Field xmlName
043: */
044: private java.lang.String xmlName;
045:
046: /**
047: * Field identity
048: */
049: private org.exolab.castor.xml.XMLFieldDescriptor identity;
050:
051: //----------------/
052: //- Constructors -/
053: //----------------/
054:
055: public ParameterValueDescriptor() {
056: super ();
057: xmlName = "ParameterValue";
058: org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
059: org.exolab.castor.xml.XMLFieldHandler handler = null;
060: org.exolab.castor.xml.FieldValidator fieldValidator = null;
061: //-- initialize attribute descriptors
062:
063: //-- _filterDefinitionName
064: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
065: java.lang.String.class, "_filterDefinitionName",
066: "FilterDefinitionName",
067: org.exolab.castor.xml.NodeType.Attribute);
068: desc.setImmutable(true);
069: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
070: public java.lang.Object getValue(java.lang.Object object)
071: throws IllegalStateException {
072: ParameterValue target = (ParameterValue) object;
073: return target.getFilterDefinitionName();
074: }
075:
076: public void setValue(java.lang.Object object,
077: java.lang.Object value)
078: throws IllegalStateException,
079: IllegalArgumentException {
080: try {
081: ParameterValue target = (ParameterValue) object;
082: target
083: .setFilterDefinitionName((java.lang.String) value);
084: } catch (java.lang.Exception ex) {
085: throw new IllegalStateException(ex.toString());
086: }
087: }
088:
089: public java.lang.Object newInstance(java.lang.Object parent) {
090: return null;
091: }
092: });
093: desc.setHandler(handler);
094: desc.setRequired(true);
095: addFieldDescriptor(desc);
096:
097: //-- validation code for: _filterDefinitionName
098: fieldValidator = new org.exolab.castor.xml.FieldValidator();
099: fieldValidator.setMinOccurs(1);
100: { //-- local scope
101: StringValidator typeValidator = new StringValidator();
102: typeValidator.setWhiteSpace("preserve");
103: fieldValidator.setValidator(typeValidator);
104: }
105: desc.setValidator(fieldValidator);
106: //-- _filterParameter
107: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
108: com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType.class,
109: "_filterParameter", "FilterParameter",
110: org.exolab.castor.xml.NodeType.Attribute);
111: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
112: public java.lang.Object getValue(java.lang.Object object)
113: throws IllegalStateException {
114: ParameterValue target = (ParameterValue) object;
115: return target.getFilterParameter();
116: }
117:
118: public void setValue(java.lang.Object object,
119: java.lang.Object value)
120: throws IllegalStateException,
121: IllegalArgumentException {
122: try {
123: ParameterValue target = (ParameterValue) object;
124: target
125: .setFilterParameter((com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType) value);
126: } catch (java.lang.Exception ex) {
127: throw new IllegalStateException(ex.toString());
128: }
129: }
130:
131: public java.lang.Object newInstance(java.lang.Object parent) {
132: return null;
133: }
134: });
135: desc
136: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
137: com.calipso.reportgenerator.reportdefinitions.types.ParameterValueFilterParameterType.class,
138: handler));
139: desc.setImmutable(true);
140: desc.setRequired(true);
141: addFieldDescriptor(desc);
142:
143: //-- validation code for: _filterParameter
144: fieldValidator = new org.exolab.castor.xml.FieldValidator();
145: fieldValidator.setMinOccurs(1);
146: { //-- local scope
147: }
148: desc.setValidator(fieldValidator);
149: //-- _defaultValue
150: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
151: java.lang.String.class, "_defaultValue",
152: "DefaultValue",
153: org.exolab.castor.xml.NodeType.Attribute);
154: desc.setImmutable(true);
155: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
156: public java.lang.Object getValue(java.lang.Object object)
157: throws IllegalStateException {
158: ParameterValue target = (ParameterValue) object;
159: return target.getDefaultValue();
160: }
161:
162: public void setValue(java.lang.Object object,
163: java.lang.Object value)
164: throws IllegalStateException,
165: IllegalArgumentException {
166: try {
167: ParameterValue target = (ParameterValue) object;
168: target.setDefaultValue((java.lang.String) value);
169: } catch (java.lang.Exception ex) {
170: throw new IllegalStateException(ex.toString());
171: }
172: }
173:
174: public java.lang.Object newInstance(java.lang.Object parent) {
175: return null;
176: }
177: });
178: desc.setHandler(handler);
179: addFieldDescriptor(desc);
180:
181: //-- validation code for: _defaultValue
182: fieldValidator = new org.exolab.castor.xml.FieldValidator();
183: { //-- local scope
184: StringValidator typeValidator = new StringValidator();
185: typeValidator.setWhiteSpace("preserve");
186: fieldValidator.setValidator(typeValidator);
187: }
188: desc.setValidator(fieldValidator);
189: //-- initialize element descriptors
190:
191: } //-- com.calipso.reportgenerator.reportdefinitions.ParameterValueDescriptor()
192:
193: //-----------/
194: //- Methods -/
195: //-----------/
196:
197: /**
198: * Method getAccessMode
199: */
200: public org.exolab.castor.mapping.AccessMode getAccessMode() {
201: return null;
202: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
203:
204: /**
205: * Method getExtends
206: */
207: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
208: return null;
209: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
210:
211: /**
212: * Method getIdentity
213: */
214: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
215: return identity;
216: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
217:
218: /**
219: * Method getJavaClass
220: */
221: public java.lang.Class getJavaClass() {
222: return com.calipso.reportgenerator.reportdefinitions.ParameterValue.class;
223: } //-- java.lang.Class getJavaClass()
224:
225: /**
226: * Method getNameSpacePrefix
227: */
228: public java.lang.String getNameSpacePrefix() {
229: return nsPrefix;
230: } //-- java.lang.String getNameSpacePrefix()
231:
232: /**
233: * Method getNameSpaceURI
234: */
235: public java.lang.String getNameSpaceURI() {
236: return nsURI;
237: } //-- java.lang.String getNameSpaceURI()
238:
239: /**
240: * Method getValidator
241: */
242: public org.exolab.castor.xml.TypeValidator getValidator() {
243: return this ;
244: } //-- org.exolab.castor.xml.TypeValidator getValidator()
245:
246: /**
247: * Method getXMLName
248: */
249: public java.lang.String getXMLName() {
250: return xmlName;
251: } //-- java.lang.String getXMLName()
252:
253: }
|