01: /*
02: * Copyright 2007 Madhav Pulipaka
03: *
04: * This file is part of Vela.
05:
06: * Vela is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * Vela is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with Vela; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19: */
20: package vela.db;
21:
22: import java.sql.SQLException;
23: import java.util.ArrayList;
24: import java.util.Hashtable;
25: import java.util.Vector;
26:
27: import vela.model.ConnectionProperties;
28: import vela.model.DBObject;
29:
30: public interface DBManager {
31:
32: public void init(ConnectionProperties connProps) throws Exception;
33:
34: public void cleanup();
35:
36: public Hashtable getDBObjects();
37:
38: public ArrayList getSource(String objectName, String objectType);
39:
40: public Vector getTabDesc(String selectedObject);
41:
42: public Vector getSequenceDetails(String sequenceName);
43:
44: public Hashtable getIndexDetails(String indxName);
45:
46: public Vector getSynDetails(String synName);
47:
48: public Hashtable getTableData(DBObject table, Vector columnNames,
49: int startIndx, int endIndx) throws SQLException;
50:
51: public String compile(String script, String objectName);
52:
53: public Hashtable getQueryData(String query) throws SQLException;
54:
55: public void commit();
56:
57: public void rollback();
58:
59: public boolean isConnectionOpen();
60: }
|