KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > ejb > PmDescriptor


1 /**
2  * This generated bean class PmDescriptor matches the schema element pm-descriptor
3  *
4  * Generated on Wed Mar 03 14:29:48 PST 2004
5  */

6
7 package com.sun.enterprise.tools.common.dd.ejb;
8
9 import org.w3c.dom.*;
10 import org.netbeans.modules.schema2beans.*;
11 import java.beans.*;
12 import java.util.*;
13
14 // BEGIN_NOI18N
15

16 public class PmDescriptor extends com.sun.enterprise.tools.common.dd.SunBaseBean
17 {
18
19     static Vector comparators = new Vector();
20
21     static public final String JavaDoc PM_IDENTIFIER = "PmIdentifier"; // NOI18N
22
static public final String JavaDoc PM_VERSION = "PmVersion"; // NOI18N
23
static public final String JavaDoc PM_CONFIG = "PmConfig"; // NOI18N
24
static public final String JavaDoc PM_CLASS_GENERATOR = "PmClassGenerator"; // NOI18N
25
static public final String JavaDoc PM_MAPPING_FACTORY = "PmMappingFactory"; // NOI18N
26

27     public PmDescriptor() {
28         this(Common.USE_DEFAULT_VALUES);
29     }
30
31     public PmDescriptor(int options)
32     {
33         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
34         // Properties (see root bean comments for the bean graph)
35
this.createProperty("pm-identifier", // NOI18N
36
PM_IDENTIFIER,
37             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
38             String JavaDoc.class);
39         this.createProperty("pm-version", // NOI18N
40
PM_VERSION,
41             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
42             String JavaDoc.class);
43         this.createProperty("pm-config", // NOI18N
44
PM_CONFIG,
45             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
46             String JavaDoc.class);
47         this.createProperty("pm-class-generator", // NOI18N
48
PM_CLASS_GENERATOR,
49             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
50             String JavaDoc.class);
51         this.createProperty("pm-mapping-factory", // NOI18N
52
PM_MAPPING_FACTORY,
53             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
54             String JavaDoc.class);
55         this.initialize(options);
56     }
57
58     // Setting the default values of the properties
59
void initialize(int options)
60     {
61                     
62     }
63
64     // This attribute is mandatory
65
public void setPmIdentifier(String JavaDoc value) {
66         this.setValue(PM_IDENTIFIER, value);
67     }
68
69     //
70
public String JavaDoc getPmIdentifier() {
71         return (String JavaDoc)this.getValue(PM_IDENTIFIER);
72     }
73
74     // This attribute is mandatory
75
public void setPmVersion(String JavaDoc value) {
76         this.setValue(PM_VERSION, value);
77     }
78
79     //
80
public String JavaDoc getPmVersion() {
81         return (String JavaDoc)this.getValue(PM_VERSION);
82     }
83
84     // This attribute is optional
85
public void setPmConfig(String JavaDoc value) {
86         this.setValue(PM_CONFIG, value);
87     }
88
89     //
90
public String JavaDoc getPmConfig() {
91         return (String JavaDoc)this.getValue(PM_CONFIG);
92     }
93
94     // This attribute is optional
95
public void setPmClassGenerator(String JavaDoc value) {
96         this.setValue(PM_CLASS_GENERATOR, value);
97     }
98
99     //
100
public String JavaDoc getPmClassGenerator() {
101         return (String JavaDoc)this.getValue(PM_CLASS_GENERATOR);
102     }
103
104     // This attribute is optional
105
public void setPmMappingFactory(String JavaDoc value) {
106         this.setValue(PM_MAPPING_FACTORY, value);
107     }
108
109     //
110
public String JavaDoc getPmMappingFactory() {
111         return (String JavaDoc)this.getValue(PM_MAPPING_FACTORY);
112     }
113
114     //
115
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
116         comparators.add(c);
117     }
118
119     //
120
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
121         comparators.remove(c);
122     }
123     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
124         boolean restrictionFailure = false;
125         // Validating property pmIdentifier
126
if (getPmIdentifier() == null) {
127             throw new org.netbeans.modules.schema2beans.ValidateException("getPmIdentifier() == null", "pmIdentifier", this); // NOI18N
128
}
129         // Validating property pmVersion
130
if (getPmVersion() == null) {
131             throw new org.netbeans.modules.schema2beans.ValidateException("getPmVersion() == null", "pmVersion", this); // NOI18N
132
}
133         // Validating property pmConfig
134
if (getPmConfig() != null) {
135         }
136         // Validating property pmClassGenerator
137
if (getPmClassGenerator() != null) {
138         }
139         // Validating property pmMappingFactory
140
if (getPmMappingFactory() != null) {
141         }
142     }
143
144     // Dump the content of this bean returning it as a String
145
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
146         String JavaDoc s;
147         Object JavaDoc o;
148         org.netbeans.modules.schema2beans.BaseBean n;
149         str.append(indent);
150         str.append("PmIdentifier"); // NOI18N
151
str.append(indent+"\t"); // NOI18N
152
str.append("<"); // NOI18N
153
s = this.getPmIdentifier();
154         str.append((s==null?"null":s.trim())); // NOI18N
155
str.append(">\n"); // NOI18N
156
this.dumpAttributes(PM_IDENTIFIER, 0, str, indent);
157
158         str.append(indent);
159         str.append("PmVersion"); // NOI18N
160
str.append(indent+"\t"); // NOI18N
161
str.append("<"); // NOI18N
162
s = this.getPmVersion();
163         str.append((s==null?"null":s.trim())); // NOI18N
164
str.append(">\n"); // NOI18N
165
this.dumpAttributes(PM_VERSION, 0, str, indent);
166
167         str.append(indent);
168         str.append("PmConfig"); // NOI18N
169
str.append(indent+"\t"); // NOI18N
170
str.append("<"); // NOI18N
171
s = this.getPmConfig();
172         str.append((s==null?"null":s.trim())); // NOI18N
173
str.append(">\n"); // NOI18N
174
this.dumpAttributes(PM_CONFIG, 0, str, indent);
175
176         str.append(indent);
177         str.append("PmClassGenerator"); // NOI18N
178
str.append(indent+"\t"); // NOI18N
179
str.append("<"); // NOI18N
180
s = this.getPmClassGenerator();
181         str.append((s==null?"null":s.trim())); // NOI18N
182
str.append(">\n"); // NOI18N
183
this.dumpAttributes(PM_CLASS_GENERATOR, 0, str, indent);
184
185         str.append(indent);
186         str.append("PmMappingFactory"); // NOI18N
187
str.append(indent+"\t"); // NOI18N
188
str.append("<"); // NOI18N
189
s = this.getPmMappingFactory();
190         str.append((s==null?"null":s.trim())); // NOI18N
191
str.append(">\n"); // NOI18N
192
this.dumpAttributes(PM_MAPPING_FACTORY, 0, str, indent);
193
194     }
195     public String JavaDoc dumpBeanNode(){
196         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
197         str.append("PmDescriptor\n"); // NOI18N
198
this.dump(str, "\n "); // NOI18N
199
return str.toString();
200     }}
201
202 // END_NOI18N
203

204
205 /*
206  * The contents of this file are subject to the terms
207  * of the Common Development and Distribution License
208  * (the License). You may not use this file except in
209  * compliance with the License.
210  *
211  * You can obtain a copy of the license at
212  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
213  * glassfish/bootstrap/legal/CDDLv1.0.txt.
214  * See the License for the specific language governing
215  * permissions and limitations under the License.
216  *
217  * When distributing Covered Code, include this CDDL
218  * Header Notice in each file and include the License file
219  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
220  * If applicable, add the following below the CDDL Header,
221  * with the fields enclosed by brackets [] replaced by
222  * you own identifying information:
223  * "Portions Copyrighted [year] [name of copyright owner]"
224  *
225  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
226  */

227
Popular Tags