KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class FlushAtEndOfMethod matches the schema element flush-at-end-of-method
3  *
4  * Generated on Wed Mar 03 14:29:49 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 FlushAtEndOfMethod extends com.sun.enterprise.tools.common.dd.SunBaseBean
17 {
18
19     static Vector comparators = new Vector();
20
21     static public final String JavaDoc METHOD = "Method"; // NOI18N
22

23     public FlushAtEndOfMethod() {
24         this(Common.USE_DEFAULT_VALUES);
25     }
26
27     public FlushAtEndOfMethod(int options)
28     {
29         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
30         // Properties (see root bean comments for the bean graph)
31
this.createProperty("method", // NOI18N
32
METHOD,
33             Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY,
34             Method.class);
35         this.initialize(options);
36     }
37
38     // Setting the default values of the properties
39
void initialize(int options)
40     {
41
42     }
43
44     // This attribute is an array containing at least one element
45
public void setMethod(int index, Method value) {
46         this.setValue(METHOD, index, value);
47     }
48
49     //
50
public Method getMethod(int index) {
51         return (Method)this.getValue(METHOD, index);
52     }
53
54     // This attribute is an array containing at least one element
55
public void setMethod(Method[] value) {
56         this.setValue(METHOD, value);
57     }
58
59     //
60
public Method[] getMethod() {
61         return (Method[])this.getValues(METHOD);
62     }
63
64     // Return the number of properties
65
public int sizeMethod() {
66         return this.size(METHOD);
67     }
68
69     // Add a new element returning its index in the list
70
public int addMethod(com.sun.enterprise.tools.common.dd.ejb.Method value) {
71         return this.addValue(METHOD, value);
72     }
73
74     //
75
// Remove an element using its reference
76
// Returns the index the element had in the list
77
//
78
public int removeMethod(com.sun.enterprise.tools.common.dd.ejb.Method value) {
79         return this.removeValue(METHOD, value);
80     }
81
82     //
83
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
84         comparators.add(c);
85     }
86
87     //
88
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
89         comparators.remove(c);
90     }
91     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
92         boolean restrictionFailure = false;
93         // Validating property method
94
if (sizeMethod() == 0) {
95             throw new org.netbeans.modules.schema2beans.ValidateException("sizeMethod() == 0", "method", this); // NOI18N
96
}
97         for (int _index = 0; _index < sizeMethod(); ++_index) {
98             com.sun.enterprise.tools.common.dd.ejb.Method element = getMethod(_index);
99             if (element != null) {
100                 element.validate();
101             }
102         }
103     }
104
105     // Dump the content of this bean returning it as a String
106
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
107         String JavaDoc s;
108         Object JavaDoc o;
109         org.netbeans.modules.schema2beans.BaseBean n;
110         str.append(indent);
111         str.append("Method["+this.sizeMethod()+"]"); // NOI18N
112
for(int i=0; i<this.sizeMethod(); i++)
113         {
114             str.append(indent+"\t");
115             str.append("#"+i+":");
116             n = (org.netbeans.modules.schema2beans.BaseBean) this.getMethod(i);
117             if (n != null)
118                 n.dump(str, indent + "\t"); // NOI18N
119
else
120                 str.append(indent+"\tnull"); // NOI18N
121
this.dumpAttributes(METHOD, i, str, indent);
122         }
123
124     }
125     public String JavaDoc dumpBeanNode(){
126         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
127         str.append("FlushAtEndOfMethod\n"); // NOI18N
128
this.dump(str, "\n "); // NOI18N
129
return str.toString();
130     }}
131
132 // END_NOI18N
133

134
135 /*
136  * The contents of this file are subject to the terms
137  * of the Common Development and Distribution License
138  * (the License). You may not use this file except in
139  * compliance with the License.
140  *
141  * You can obtain a copy of the license at
142  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
143  * glassfish/bootstrap/legal/CDDLv1.0.txt.
144  * See the License for the specific language governing
145  * permissions and limitations under the License.
146  *
147  * When distributing Covered Code, include this CDDL
148  * Header Notice in each file and include the License file
149  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
150  * If applicable, add the following below the CDDL Header,
151  * with the fields enclosed by brackets [] replaced by
152  * you own identifying information:
153  * "Portions Copyrighted [year] [name of copyright owner]"
154  *
155  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
156  */

157
Popular Tags