1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an
4 * XML Schema.
5 * $Id$
6 */
7
8 package org.enableit.db.beans;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.mapping.ClassDescriptor;
16 import org.exolab.castor.mapping.FieldDescriptor;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.FieldValidator;
19 import org.exolab.castor.xml.TypeValidator;
20 import org.exolab.castor.xml.XMLFieldDescriptor;
21 import org.exolab.castor.xml.handlers.*;
22 import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
23 import org.exolab.castor.xml.validators.*;
24
25 /***
26 *
27 *
28 * @version $Revision$ $Date$
29 **/
30 public class FunctionDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
31
32
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
36
37 private java.lang.String nsPrefix;
38
39 private java.lang.String nsURI;
40
41 private java.lang.String xmlName;
42
43 private org.exolab.castor.xml.XMLFieldDescriptor identity;
44
45
46 //----------------/
47 //- Constructors -/
48 //----------------/
49
50 public FunctionDescriptor() {
51 super();
52 xmlName = "function";
53 XMLFieldDescriptorImpl desc = null;
54 XMLFieldHandler handler = null;
55 FieldValidator fieldValidator = null;
56 //-- initialize attribute descriptors
57
58 //-- _name
59 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", NodeType.Attribute);
60 desc.setImmutable(true);
61 handler = (new XMLFieldHandler() {
62 public java.lang.Object getValue( java.lang.Object object )
63 throws IllegalStateException
64 {
65 Function target = (Function) object;
66 return target.getName();
67 }
68 public void setValue( java.lang.Object object, java.lang.Object value)
69 throws IllegalStateException, IllegalArgumentException
70 {
71 try {
72 Function target = (Function) object;
73 target.setName( (java.lang.String) value);
74 }
75 catch (Exception ex) {
76 throw new IllegalStateException(ex.toString());
77 }
78 }
79 public java.lang.Object newInstance( java.lang.Object parent ) {
80 return null;
81 }
82 } );
83 desc.setHandler(handler);
84 desc.setRequired(true);
85 addFieldDescriptor(desc);
86
87 //-- validation code for: _name
88 fieldValidator = new FieldValidator();
89 fieldValidator.setMinOccurs(1);
90 { //-- local scope
91 StringValidator typeValidator = new StringValidator();
92 typeValidator.setWhiteSpace("preserve");
93 fieldValidator.setValidator(typeValidator);
94 }
95 desc.setValidator(fieldValidator);
96 //-- _pattern
97 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_pattern", "pattern", NodeType.Attribute);
98 desc.setImmutable(true);
99 handler = (new XMLFieldHandler() {
100 public java.lang.Object getValue( java.lang.Object object )
101 throws IllegalStateException
102 {
103 Function target = (Function) object;
104 return target.getPattern();
105 }
106 public void setValue( java.lang.Object object, java.lang.Object value)
107 throws IllegalStateException, IllegalArgumentException
108 {
109 try {
110 Function target = (Function) object;
111 target.setPattern( (java.lang.String) value);
112 }
113 catch (Exception ex) {
114 throw new IllegalStateException(ex.toString());
115 }
116 }
117 public java.lang.Object newInstance( java.lang.Object parent ) {
118 return null;
119 }
120 } );
121 desc.setHandler(handler);
122 desc.setRequired(true);
123 addFieldDescriptor(desc);
124
125 //-- validation code for: _pattern
126 fieldValidator = new FieldValidator();
127 fieldValidator.setMinOccurs(1);
128 { //-- local scope
129 StringValidator typeValidator = new StringValidator();
130 typeValidator.setWhiteSpace("preserve");
131 fieldValidator.setValidator(typeValidator);
132 }
133 desc.setValidator(fieldValidator);
134 //-- initialize element descriptors
135
136 } //-- org.enableit.db.beans.FunctionDescriptor()
137
138
139 //-----------/
140 //- Methods -/
141 //-----------/
142
143 /***
144 **/
145 public org.exolab.castor.mapping.AccessMode getAccessMode()
146 {
147 return null;
148 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
149
150 /***
151 **/
152 public org.exolab.castor.mapping.ClassDescriptor getExtends()
153 {
154 return null;
155 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
156
157 /***
158 **/
159 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
160 {
161 return identity;
162 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
163
164 /***
165 **/
166 public java.lang.Class getJavaClass()
167 {
168 return org.enableit.db.beans.Function.class;
169 } //-- java.lang.Class getJavaClass()
170
171 /***
172 **/
173 public java.lang.String getNameSpacePrefix()
174 {
175 return nsPrefix;
176 } //-- java.lang.String getNameSpacePrefix()
177
178 /***
179 **/
180 public java.lang.String getNameSpaceURI()
181 {
182 return nsURI;
183 } //-- java.lang.String getNameSpaceURI()
184
185 /***
186 **/
187 public org.exolab.castor.xml.TypeValidator getValidator()
188 {
189 return this;
190 } //-- org.exolab.castor.xml.TypeValidator getValidator()
191
192 /***
193 **/
194 public java.lang.String getXMLName()
195 {
196 return xmlName;
197 } //-- java.lang.String getXMLName()
198
199 }
This page was automatically generated by Maven