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 ViewParameterValueDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class ViewParameterValueDescriptor 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 ViewParameterValueDescriptor() {
056: super ();
057: xmlName = "ViewParameterValue";
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: //-- _viewParamName
064: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
065: java.lang.String.class, "_viewParamName",
066: "ViewParamName",
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: ViewParameterValue target = (ViewParameterValue) object;
073: return target.getViewParamName();
074: }
075:
076: public void setValue(java.lang.Object object,
077: java.lang.Object value)
078: throws IllegalStateException,
079: IllegalArgumentException {
080: try {
081: ViewParameterValue target = (ViewParameterValue) object;
082: target.setViewParamName((java.lang.String) value);
083: } catch (java.lang.Exception ex) {
084: throw new IllegalStateException(ex.toString());
085: }
086: }
087:
088: public java.lang.Object newInstance(java.lang.Object parent) {
089: return null;
090: }
091: });
092: desc.setHandler(handler);
093: desc.setRequired(true);
094: addFieldDescriptor(desc);
095:
096: //-- validation code for: _viewParamName
097: fieldValidator = new org.exolab.castor.xml.FieldValidator();
098: fieldValidator.setMinOccurs(1);
099: { //-- local scope
100: StringValidator typeValidator = new StringValidator();
101: typeValidator.setWhiteSpace("preserve");
102: fieldValidator.setValidator(typeValidator);
103: }
104: desc.setValidator(fieldValidator);
105: //-- _viewParamValue
106: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
107: java.lang.String.class, "_viewParamValue",
108: "ViewParamValue",
109: org.exolab.castor.xml.NodeType.Attribute);
110: desc.setImmutable(true);
111: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
112: public java.lang.Object getValue(java.lang.Object object)
113: throws IllegalStateException {
114: ViewParameterValue target = (ViewParameterValue) object;
115: return target.getViewParamValue();
116: }
117:
118: public void setValue(java.lang.Object object,
119: java.lang.Object value)
120: throws IllegalStateException,
121: IllegalArgumentException {
122: try {
123: ViewParameterValue target = (ViewParameterValue) object;
124: target.setViewParamValue((java.lang.String) value);
125: } catch (java.lang.Exception ex) {
126: throw new IllegalStateException(ex.toString());
127: }
128: }
129:
130: public java.lang.Object newInstance(java.lang.Object parent) {
131: return null;
132: }
133: });
134: desc.setHandler(handler);
135: desc.setRequired(true);
136: addFieldDescriptor(desc);
137:
138: //-- validation code for: _viewParamValue
139: fieldValidator = new org.exolab.castor.xml.FieldValidator();
140: fieldValidator.setMinOccurs(1);
141: { //-- local scope
142: StringValidator typeValidator = new StringValidator();
143: typeValidator.setWhiteSpace("preserve");
144: fieldValidator.setValidator(typeValidator);
145: }
146: desc.setValidator(fieldValidator);
147: //-- initialize element descriptors
148:
149: } //-- com.calipso.reportgenerator.reportdefinitions.ViewParameterValueDescriptor()
150:
151: //-----------/
152: //- Methods -/
153: //-----------/
154:
155: /**
156: * Method getAccessMode
157: */
158: public org.exolab.castor.mapping.AccessMode getAccessMode() {
159: return null;
160: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
161:
162: /**
163: * Method getExtends
164: */
165: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
166: return null;
167: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
168:
169: /**
170: * Method getIdentity
171: */
172: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
173: return identity;
174: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
175:
176: /**
177: * Method getJavaClass
178: */
179: public java.lang.Class getJavaClass() {
180: return com.calipso.reportgenerator.reportdefinitions.ViewParameterValue.class;
181: } //-- java.lang.Class getJavaClass()
182:
183: /**
184: * Method getNameSpacePrefix
185: */
186: public java.lang.String getNameSpacePrefix() {
187: return nsPrefix;
188: } //-- java.lang.String getNameSpacePrefix()
189:
190: /**
191: * Method getNameSpaceURI
192: */
193: public java.lang.String getNameSpaceURI() {
194: return nsURI;
195: } //-- java.lang.String getNameSpaceURI()
196:
197: /**
198: * Method getValidator
199: */
200: public org.exolab.castor.xml.TypeValidator getValidator() {
201: return this ;
202: } //-- org.exolab.castor.xml.TypeValidator getValidator()
203:
204: /**
205: * Method getXMLName
206: */
207: public java.lang.String getXMLName() {
208: return xmlName;
209: } //-- java.lang.String getXMLName()
210:
211: }
|