01: /*
02: * HA-JDBC: High-Availability JDBC
03: * Copyright (c) 2004-2007 Paul Ferraro
04: *
05: * This library is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU Lesser General Public License as published by the
07: * Free Software Foundation; either version 2.1 of the License, or (at your
08: * option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful, but WITHOUT
11: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13: * for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public License
16: * along with this library; if not, write to the Free Software Foundation,
17: * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *
19: * Contact: ferraro@users.sourceforge.net
20: */
21: package net.sf.hajdbc;
22:
23: import java.sql.Connection;
24: import java.sql.SQLException;
25:
26: import javax.management.DynamicMBean;
27:
28: import net.sf.hajdbc.sql.AbstractDatabase;
29:
30: /**
31: * @author Paul Ferraro
32: *
33: */
34: public class MockDatabase extends AbstractDatabase<Void> {
35: public MockDatabase() {
36: this (""); //$NON-NLS-1$
37: }
38:
39: public MockDatabase(String id) {
40: this (id, 1);
41: }
42:
43: public MockDatabase(String id, int weight) {
44: this .setId(id);
45: this .setWeight(weight);
46: this .clean();
47: }
48:
49: /**
50: * @see net.sf.hajdbc.Database#connect(T)
51: */
52: @SuppressWarnings("unused")
53: public Connection connect(Void connectionFactory)
54: throws SQLException {
55: return null;
56: }
57:
58: /**
59: * @see net.sf.hajdbc.Database#createConnectionFactory()
60: */
61: public Void createConnectionFactory() {
62: return null;
63: }
64:
65: /**
66: * @see net.sf.hajdbc.Database#getConnectionFactoryClass()
67: */
68: public Class<Void> getConnectionFactoryClass() {
69: return null;
70: }
71:
72: /**
73: * @see net.sf.hajdbc.Database#getActiveMBeanClass()
74: */
75: public DynamicMBean getActiveMBean() {
76: return null;
77: }
78:
79: /**
80: * @see net.sf.hajdbc.Database#getInactiveMBeanClass()
81: */
82: public DynamicMBean getInactiveMBean() {
83: return null;
84: }
85: }
|