KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > tools > mapping > reversedb2 > ojbmetatreemodel > OjbMetaIndexDescriptorNode


1 package org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel;
2
3 import org.apache.ojb.broker.metadata.DescriptorRepository;
4 import org.apache.ojb.broker.metadata.IndexDescriptor;
5
6 public class OjbMetaIndexDescriptorNode extends OjbMetaTreeNode
7 {
8     private static java.util.ArrayList JavaDoc supportedActions = new java.util.ArrayList JavaDoc();
9     
10     private IndexDescriptor indexDescriptor;
11 /* Copyright 2002-2005 The Apache Software Foundation
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */

25     public OjbMetaIndexDescriptorNode(
26         DescriptorRepository pRepository,
27         OjbMetaDataTreeModel pTreeModel,
28         OjbMetaTreeNode pparent,
29         IndexDescriptor pIndexDescriptor)
30     {
31         super(pRepository, pTreeModel, pparent);
32         this.indexDescriptor = pIndexDescriptor;
33     }
34
35     /**
36      * @see OjbMetaTreeNode#_load()
37      */

38     protected boolean _load()
39     {
40         return true;
41     }
42
43     /**
44      * @see OjbMetaTreeNode#isLeaf()
45      */

46     public boolean isLeaf()
47     {
48         return false;
49     }
50
51     /**
52      * @see OjbMetaTreeNode#getAllowsChildren()
53      */

54     public boolean getAllowsChildren()
55     {
56         return false;
57     }
58
59     /**
60      * @see OjbMetaTreeNode#setAttribute(String, Object)
61      */

62     public void setAttribute(String JavaDoc strKey, Object JavaDoc value)
63     {
64     }
65
66     /**
67      * @see OjbMetaTreeNode#getAttribute(String)
68      */

69     public Object JavaDoc getAttribute(String JavaDoc strKey)
70     {
71         return null;
72     }
73
74     /**
75      * @see PropertyEditorTarget#getPropertyEditorClass()
76      */

77     public Class JavaDoc getPropertyEditorClass()
78     {
79         return null;
80     }
81     
82     public String JavaDoc toString()
83     {
84         return "IndexDescriptor: " +indexDescriptor.getName();
85     }
86
87     /**
88      * @see ActionTarget#getActions()
89      */

90     public java.util.Iterator JavaDoc getActions()
91     {
92         return supportedActions.iterator();
93     }
94     
95     /**
96      * @see ActionTarget#actionListCacheable()
97      */

98     public boolean actionListCachable()
99     {
100         return true;
101     }
102     
103     public boolean actionListStatic()
104     {
105         return true;
106     }
107     
108     /**
109      * Return the descriptor object this node is associated with. E.g. if the
110      * node displays a class descriptor, the ClassDescriptor describing the class
111      * should be returned. Used for creating a Transferable.
112      */

113     public Object JavaDoc getAssociatedDescriptor()
114     {
115         return indexDescriptor;
116     }
117     
118 }
119
120
Popular Tags