KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class Cmp matches the schema element cmp
3  *
4  * Generated on Thu Mar 25 11:25:27 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 Cmp extends com.sun.enterprise.tools.common.dd.SunBaseBean
17 {
18
19     static Vector comparators = new Vector();
20
21     static public final String JavaDoc MAPPING_PROPERTIES = "MappingProperties"; // NOI18N
22
static public final String JavaDoc IS_ONE_ONE_CMP = "IsOneOneCmp"; // NOI18N
23
static public final String JavaDoc ONE_ONE_FINDERS = "OneOneFinders"; // NOI18N
24
static public final String JavaDoc PREFETCH_DISABLED = "PrefetchDisabled"; // NOI18N
25

26     public Cmp() {
27         this(Common.USE_DEFAULT_VALUES);
28     }
29
30     public Cmp(int options)
31     {
32         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
33         // Properties (see root bean comments for the bean graph)
34
this.createProperty("mapping-properties", // NOI18N
35
MAPPING_PROPERTIES,
36             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
37             String JavaDoc.class);
38         this.createProperty("is-one-one-cmp", // NOI18N
39
IS_ONE_ONE_CMP,
40             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
41             String JavaDoc.class);
42         this.createProperty("one-one-finders", // NOI18N
43
ONE_ONE_FINDERS,
44             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
45             OneOneFinders.class);
46         this.createProperty("prefetch-disabled", // NOI18N
47
PREFETCH_DISABLED,
48             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
49             PrefetchDisabled.class);
50         this.initialize(options);
51     }
52
53     // Setting the default values of the properties
54
void initialize(int options)
55     {
56         
57     }
58
59     // This attribute is optional
60
public void setMappingProperties(String JavaDoc value) {
61         this.setValue(MAPPING_PROPERTIES, value);
62     }
63
64     //
65
public String JavaDoc getMappingProperties() {
66         return (String JavaDoc)this.getValue(MAPPING_PROPERTIES);
67     }
68
69     // This attribute is optional
70
public void setIsOneOneCmp(String JavaDoc value) {
71         this.setValue(IS_ONE_ONE_CMP, value);
72     }
73
74     //
75
public String JavaDoc getIsOneOneCmp() {
76         return (String JavaDoc)this.getValue(IS_ONE_ONE_CMP);
77     }
78
79     // This attribute is optional
80
public void setOneOneFinders(OneOneFinders value) {
81         this.setValue(ONE_ONE_FINDERS, value);
82     }
83
84     //
85
public OneOneFinders getOneOneFinders() {
86         return (OneOneFinders)this.getValue(ONE_ONE_FINDERS);
87     }
88
89     // This attribute is optional
90
public void setPrefetchDisabled(PrefetchDisabled value) {
91         this.setValue(PREFETCH_DISABLED, value);
92     }
93
94     //
95
public PrefetchDisabled getPrefetchDisabled() {
96         return (PrefetchDisabled)this.getValue(PREFETCH_DISABLED);
97     }
98
99     //
100
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
101         comparators.add(c);
102     }
103
104     //
105
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
106         comparators.remove(c);
107     }
108     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
109         boolean restrictionFailure = false;
110         // Validating property mappingProperties
111
if (getMappingProperties() != null) {
112         }
113         // Validating property isOneOneCmp
114
if (getIsOneOneCmp() != null) {
115         }
116         // Validating property oneOneFinders
117
if (getOneOneFinders() != null) {
118             getOneOneFinders().validate();
119         }
120         // Validating property prefetchDisabled
121
if (getPrefetchDisabled() != null) {
122             getPrefetchDisabled().validate();
123         }
124     }
125
126     // Dump the content of this bean returning it as a String
127
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
128         String JavaDoc s;
129         Object JavaDoc o;
130         org.netbeans.modules.schema2beans.BaseBean n;
131         str.append(indent);
132         str.append("MappingProperties"); // NOI18N
133
str.append(indent+"\t"); // NOI18N
134
str.append("<"); // NOI18N
135
s = this.getMappingProperties();
136         str.append((s==null?"null":s.trim())); // NOI18N
137
str.append(">\n"); // NOI18N
138
this.dumpAttributes(MAPPING_PROPERTIES, 0, str, indent);
139
140         str.append(indent);
141         str.append("IsOneOneCmp"); // NOI18N
142
str.append(indent+"\t"); // NOI18N
143
str.append("<"); // NOI18N
144
s = this.getIsOneOneCmp();
145         str.append((s==null?"null":s.trim())); // NOI18N
146
str.append(">\n"); // NOI18N
147
this.dumpAttributes(IS_ONE_ONE_CMP, 0, str, indent);
148
149         str.append(indent);
150         str.append("OneOneFinders"); // NOI18N
151
n = (org.netbeans.modules.schema2beans.BaseBean) this.getOneOneFinders();
152         if (n != null)
153             n.dump(str, indent + "\t"); // NOI18N
154
else
155             str.append(indent+"\tnull"); // NOI18N
156
this.dumpAttributes(ONE_ONE_FINDERS, 0, str, indent);
157
158         str.append(indent);
159         str.append("PrefetchDisabled"); // NOI18N
160
n = (org.netbeans.modules.schema2beans.BaseBean) this.getPrefetchDisabled();
161         if (n != null)
162             n.dump(str, indent + "\t"); // NOI18N
163
else
164             str.append(indent+"\tnull"); // NOI18N
165
this.dumpAttributes(PREFETCH_DISABLED, 0, str, indent);
166
167     }
168     public String JavaDoc dumpBeanNode(){
169         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
170         str.append("Cmp\n"); // NOI18N
171
this.dump(str, "\n "); // NOI18N
172
return str.toString();
173     }}
174
175 // END_NOI18N
176

177
178 /*
179  * The contents of this file are subject to the terms
180  * of the Common Development and Distribution License
181  * (the License). You may not use this file except in
182  * compliance with the License.
183  *
184  * You can obtain a copy of the license at
185  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
186  * glassfish/bootstrap/legal/CDDLv1.0.txt.
187  * See the License for the specific language governing
188  * permissions and limitations under the License.
189  *
190  * When distributing Covered Code, include this CDDL
191  * Header Notice in each file and include the License file
192  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
193  * If applicable, add the following below the CDDL Header,
194  * with the fields enclosed by brackets [] replaced by
195  * you own identifying information:
196  * "Portions Copyrighted [year] [name of copyright owner]"
197  *
198  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
199  */

200
Popular Tags