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 RolesDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class RolesDescriptor 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 RolesDescriptor() {
056: super ();
057: xmlName = "Roles";
058:
059: //-- set grouping compositor
060: setCompositorAsSequence();
061: org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
062: org.exolab.castor.xml.XMLFieldHandler handler = null;
063: org.exolab.castor.xml.FieldValidator fieldValidator = null;
064: //-- initialize attribute descriptors
065:
066: //-- initialize element descriptors
067:
068: //-- _rolList
069: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
070: com.calipso.reportgenerator.reportdefinitions.Rol.class,
071: "_rolList", "Rol",
072: org.exolab.castor.xml.NodeType.Element);
073: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
074: public java.lang.Object getValue(java.lang.Object object)
075: throws IllegalStateException {
076: Roles target = (Roles) object;
077: return target.getRol();
078: }
079:
080: public void setValue(java.lang.Object object,
081: java.lang.Object value)
082: throws IllegalStateException,
083: IllegalArgumentException {
084: try {
085: Roles target = (Roles) object;
086: target
087: .addRol((com.calipso.reportgenerator.reportdefinitions.Rol) value);
088: } catch (java.lang.Exception ex) {
089: throw new IllegalStateException(ex.toString());
090: }
091: }
092:
093: public java.lang.Object newInstance(java.lang.Object parent) {
094: return new com.calipso.reportgenerator.reportdefinitions.Rol();
095: }
096: });
097: desc.setHandler(handler);
098: desc.setMultivalued(true);
099: addFieldDescriptor(desc);
100:
101: //-- validation code for: _rolList
102: fieldValidator = new org.exolab.castor.xml.FieldValidator();
103: fieldValidator.setMinOccurs(0);
104: { //-- local scope
105: }
106: desc.setValidator(fieldValidator);
107: } //-- com.calipso.reportgenerator.reportdefinitions.RolesDescriptor()
108:
109: //-----------/
110: //- Methods -/
111: //-----------/
112:
113: /**
114: * Method getAccessMode
115: */
116: public org.exolab.castor.mapping.AccessMode getAccessMode() {
117: return null;
118: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
119:
120: /**
121: * Method getExtends
122: */
123: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
124: return null;
125: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
126:
127: /**
128: * Method getIdentity
129: */
130: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
131: return identity;
132: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
133:
134: /**
135: * Method getJavaClass
136: */
137: public java.lang.Class getJavaClass() {
138: return com.calipso.reportgenerator.reportdefinitions.Roles.class;
139: } //-- java.lang.Class getJavaClass()
140:
141: /**
142: * Method getNameSpacePrefix
143: */
144: public java.lang.String getNameSpacePrefix() {
145: return nsPrefix;
146: } //-- java.lang.String getNameSpacePrefix()
147:
148: /**
149: * Method getNameSpaceURI
150: */
151: public java.lang.String getNameSpaceURI() {
152: return nsURI;
153: } //-- java.lang.String getNameSpaceURI()
154:
155: /**
156: * Method getValidator
157: */
158: public org.exolab.castor.xml.TypeValidator getValidator() {
159: return this ;
160: } //-- org.exolab.castor.xml.TypeValidator getValidator()
161:
162: /**
163: * Method getXMLName
164: */
165: public java.lang.String getXMLName() {
166: return xmlName;
167: } //-- java.lang.String getXMLName()
168:
169: }
|