1
2
3
4
5
6 package salto.tool.sql.data;
7
8 import salto.tool.sql.ConnectionInfo;
9 import salto.tool.sql.DatabaseInfo;
10
11 /***
12 * @author eloiez@salto-consulting.com
13 */
14 public class CatalogInfo {
15 protected String catalog;
16
17 protected ShemaInfo[] shemaInfos;
18
19 protected ConnectionInfo connInfo;
20
21 private TableInfo[] tableInfos;
22
23 /***
24 * @return Returns the conn.
25 */
26 public ConnectionInfo getConnInfo() {
27 return connInfo;
28 }
29
30 /***
31 * @param conn The conn to set.
32 */
33 public void setConnInfo(ConnectionInfo conn) {
34 this.connInfo = conn;
35 }
36
37 /***
38 * @param string
39 */
40 public CatalogInfo(ConnectionInfo info, String catalog) {
41 this.catalog = catalog;
42 this.connInfo = info;
43 }
44
45 /***
46 * @return Returns the shemaInfos.
47 */
48 public ShemaInfo[] getShemaInfos() {
49
50
51
52
53
54
55
56
57
58
59 return shemaInfos;
60 }
61
62 /***
63 * @param shemaInfos The shemaInfos to set.
64 */
65 public void setShemaInfos(ShemaInfo[] shemaInfos) {
66 this.shemaInfos = shemaInfos;
67 }
68
69 /***
70 * @return Returns the catalog.
71 */
72 public String getCatalog() {
73 return catalog;
74 }
75
76 /***
77 * @param catalog The catalog to set.
78 */
79 public void setCatalog(String catalog) {
80 this.catalog = catalog;
81 }
82
83 /***
84 * @return Returns the tableInfos.
85 */
86 public TableInfo[] getTableInfos(boolean find) {
87 if (find && tableInfos == null) {
88 tableInfos = DatabaseInfo.getTables(this);
89 }
90 return tableInfos;
91 }
92 }