KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > util > DOTable


1 package org.enhydra.util;
2
3 /**
4  * <p>Title: </p>
5  * <p>Description: </p>
6  * <p>Copyright: Copyright (c) 2004</p>
7  * <p>Company: </p>
8  * @author not attributable
9  * @version 1.0
10  */

11
12 public class DOTable {
13   private String JavaDoc dBName;
14   private String JavaDoc tableName;
15   private Class JavaDoc cls;
16   private DOTable() {};
17   public DOTable(String JavaDoc dBName, Class JavaDoc cls) {
18     this.dBName = dBName;
19     this.cls = cls;
20     tableName = cls.getName();
21     int j = tableName.lastIndexOf(".") + 1;
22     if (j < 0) {
23       j = 0;
24     }
25     tableName = tableName.substring(j);
26     tableName = tableName.substring(0, tableName.length() - 2);
27   }
28
29   public String JavaDoc getDBName() {
30     return dBName;
31   }
32
33   public String JavaDoc getTableName() {
34     return tableName;
35   }
36
37   public Class JavaDoc getCls() {
38     return cls;
39   }
40
41 }
Popular Tags