KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > broker > metadata > torque > TableDescriptor


1 package org.apache.ojb.broker.metadata.torque;
2
3 /* Copyright 2002-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 import org.apache.ojb.broker.metadata.FieldDescriptor;
19
20 import java.util.TreeMap JavaDoc;
21 import java.util.Vector JavaDoc;
22
23 public class TableDescriptor {
24
25     private TreeMap JavaDoc columnsMap = new TreeMap JavaDoc();
26     private Vector JavaDoc columns = new Vector JavaDoc();
27     private Vector JavaDoc indices = new Vector JavaDoc();
28     private Vector JavaDoc references = new Vector JavaDoc();
29     private String JavaDoc name;
30
31     public String JavaDoc getName() {
32         return this.name;
33     }
34
35     public void setName(String JavaDoc name) {
36         this.name = name;
37     }
38
39     public Vector JavaDoc getColumns() {
40         return this.columns;
41     }
42
43     public void addColumn(FieldDescriptor column) {
44         if (!this.columnsMap.containsKey(column.getColumnName())) {
45             this.columnsMap.put(column.getColumnName(), column);
46             this.columns.add(column);
47         }
48     }
49
50     public Vector JavaDoc getIndices() {
51         return this.indices;
52     }
53
54     public void setIndices(Vector JavaDoc indices) {
55         this.indices = indices;
56     }
57
58     public Vector JavaDoc getReferences() {
59         return this.references;
60     }
61
62     public void setReferences(Vector JavaDoc references) {
63         this.references = references;
64     }
65
66 }
67
Popular Tags