01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.module.database;
11:
12: import java.sql.*;
13:
14: /**
15: * JDBCInterface is _only_ the module JDBC interface who setup the connections
16: * it has nothing tofo with the JDBC interface.
17: *
18: * @duplicate Not really needed. Remove and reference JDBC directly. Note that direct
19: * references to JDBC will be removed from most of the core (only the storagemanagerfactory
20: * will reference the JDBC module directly)
21: * @author vpro
22: * @version $Id: JDBCInterface.java,v 1.7 2004/10/07 17:22:35 pierre Exp $
23: */
24: public interface JDBCInterface {
25:
26: /**
27: * @javadoc
28: */
29: public String makeUrl();
30:
31: /**
32: * @javadoc
33: */
34: public String makeUrl(String dbm);
35:
36: /**
37: * @javadoc
38: */
39: public String makeUrl(String host, String dbm);
40:
41: /**
42: * @javadoc
43: */
44: public String makeUrl(String host, int port, String dbm);
45:
46: // JDBC Pools
47: /**
48: * @javadoc
49: */
50: public MultiConnection getConnection(String url, String name,
51: String password) throws SQLException;
52:
53: /**
54: * @javadoc
55: */
56: public MultiConnection getConnection(String url)
57: throws SQLException;
58:
59: /**
60: * @javadoc
61: */
62: public Connection getDirectConnection(String url)
63: throws SQLException;
64:
65: /**
66: * @javadoc
67: */
68: public Connection getDirectConnection(String url, String name,
69: String password) throws SQLException;
70:
71: /**
72: * @javadoc
73: */
74: public String getUser();
75:
76: /**
77: * @javadoc
78: */
79: public String getPassword();
80:
81: /**
82: * @javadoc
83: */
84: public String getDatabaseName();
85:
86: /**
87: * @javadoc
88: */
89: public void checkTime();
90: }
|