1 package org.apache.torque.adapter;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.sql.Connection;
23 import java.sql.SQLException;
24
25 /***
26 * This DatabaseHandler is used when you do not have a database
27 * installed.
28 *
29 * @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
30 * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
31 * @version $Id: DBNone.java 473821 2006-11-11 22:37:25Z tv $
32 */
33 public class DBNone extends AbstractDBAdapter
34 {
35 /***
36 * Serial version
37 */
38 private static final long serialVersionUID = -285009315025818009L;
39
40 /***
41 * Empty protected constructor.
42 */
43 protected DBNone()
44 {
45 }
46
47 /***
48 * @return null
49 */
50 public Connection getConnection()
51 {
52 return null;
53 }
54
55 /***
56 * This method is used to ignore case.
57 *
58 * @param in The string to transform to upper case.
59 * @return The upper case string.
60 */
61 public String toUpperCase(String in)
62 {
63 return in;
64 }
65
66 /***
67 * This method is used to ignore case.
68 *
69 * @param in The string whose case to ignore.
70 * @return The string in a case that can be ignored.
71 */
72 public String ignoreCase(String in)
73 {
74 return in;
75 }
76
77 /***
78 * @see org.apache.torque.adapter.DB#getIDMethodType()
79 */
80 public String getIDMethodType()
81 {
82 return NO_ID_METHOD;
83 }
84
85 /***
86 * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj)
87 */
88 public String getIDMethodSQL(Object obj)
89 {
90 return null;
91 }
92
93 /***
94 * Locks the specified table.
95 *
96 * @param con The JDBC connection to use.
97 * @param table The name of the table to lock.
98 * @exception SQLException No Statement could be created or executed.
99 */
100 public void lockTable(Connection con, String table) throws SQLException
101 {
102 }
103
104 /***
105 * Unlocks the specified table.
106 *
107 * @param con The JDBC connection to use.
108 * @param table The name of the table to unlock.
109 * @exception SQLException No Statement could be created or executed.
110 */
111 public void unlockTable(Connection con, String table) throws SQLException
112 {
113 }
114 }