001: package org.apache.torque.adapter;
002:
003: /*
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: import java.sql.Connection;
023: import java.sql.SQLException;
024:
025: /**
026: * This DatabaseHandler is used when you do not have a database
027: * installed.
028: *
029: * @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
030: * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
031: * @version $Id: DBNone.java 473821 2006-11-11 22:37:25Z tv $
032: */
033: public class DBNone extends AbstractDBAdapter {
034: /**
035: * Serial version
036: */
037: private static final long serialVersionUID = -285009315025818009L;
038:
039: /**
040: * Empty protected constructor.
041: */
042: protected DBNone() {
043: }
044:
045: /**
046: * @return null
047: */
048: public Connection getConnection() {
049: return null;
050: }
051:
052: /**
053: * This method is used to ignore case.
054: *
055: * @param in The string to transform to upper case.
056: * @return The upper case string.
057: */
058: public String toUpperCase(String in) {
059: return in;
060: }
061:
062: /**
063: * This method is used to ignore case.
064: *
065: * @param in The string whose case to ignore.
066: * @return The string in a case that can be ignored.
067: */
068: public String ignoreCase(String in) {
069: return in;
070: }
071:
072: /**
073: * @see org.apache.torque.adapter.DB#getIDMethodType()
074: */
075: public String getIDMethodType() {
076: return NO_ID_METHOD;
077: }
078:
079: /**
080: * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj)
081: */
082: public String getIDMethodSQL(Object obj) {
083: return null;
084: }
085:
086: /**
087: * Locks the specified table.
088: *
089: * @param con The JDBC connection to use.
090: * @param table The name of the table to lock.
091: * @exception SQLException No Statement could be created or executed.
092: */
093: public void lockTable(Connection con, String table)
094: throws SQLException {
095: }
096:
097: /**
098: * Unlocks the specified table.
099: *
100: * @param con The JDBC connection to use.
101: * @param table The name of the table to unlock.
102: * @exception SQLException No Statement could be created or executed.
103: */
104: public void unlockTable(Connection con, String table)
105: throws SQLException {
106: }
107: }
|