📄 nullconnection.java.jdk1.4
字号:
/**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "Exolab" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of Exoffice Technologies. For written permission,
* please contact info@exolab.org.
*
* 4. Products derived from this Software may not be called "Exolab"
* nor may "Exolab" appear in their names without prior written
* permission of Exoffice Technologies. Exolab is a registered
* trademark of Exoffice Technologies.
*
* 5. Due credit should be given to the Exolab Project
* (http://www.exolab.org/).
*
* THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2000 (C) Exoffice Technologies Inc. All Rights Reserved.
*
* $Id: NullConnection.java.jdk1.4,v 1.1 2003/01/24 02:45:14 jalateras Exp $
*
* Date Author Changes
* $Date jimm Created
*/
package org.exolab.jms.persistence;
// java sql
import java.sql.Connection;
class NullConnection implements java.sql.Connection {
// the following methods are just to satisfy the implementation of the
// java.sql.Connection interface and do not have any semantics.
public java.sql.Statement createStatement()
throws java.sql.SQLException{
return null;
}
public java.sql.PreparedStatement prepareStatement(String sql)
throws java.sql.SQLException {
return null;
}
public java.sql.CallableStatement prepareCall(String sql)
throws java.sql.SQLException {
return null;
}
public String nativeSQL(String sql)
throws java.sql.SQLException {
return null;
}
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException {
}
public boolean getAutoCommit()
throws java.sql.SQLException {
return true;
}
public void commit()
throws java.sql.SQLException {
}
public void rollback()
throws java.sql.SQLException {
}
public void close()
throws java.sql.SQLException {
}
public boolean isClosed()
throws java.sql.SQLException {
return false;
}
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException {
return null;
}
public void setReadOnly(boolean readOnly)
throws java.sql.SQLException {
}
public boolean isReadOnly()
throws java.sql.SQLException {
return false;
}
public void setCatalog(String catalog)
throws java.sql.SQLException {
}
public String getCatalog()
throws java.sql.SQLException {
return null;
}
public void setTransactionIsolation(int level)
throws java.sql.SQLException {
}
public int getTransactionIsolation()
throws java.sql.SQLException {
return 0;
}
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException {
return null;
}
public void clearWarnings()
throws java.sql.SQLException {
}
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException {
return null;
}
public java.sql.PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException {
return null;
}
public java.sql.CallableStatement prepareCall(String sql, int resultSetType,
int resultSetConcurrency) throws java.sql.SQLException {
return null;
}
public java.util.Map getTypeMap()
throws java.sql.SQLException {
return null;
}
public void setTypeMap(java.util.Map map)
throws java.sql.SQLException {
}
public java.sql.Statement createStatement(int param, int param1, int param2) throws java.sql.SQLException {
return null;
}
public int getHoldability() throws java.sql.SQLException {
return 0;
}
public java.sql.CallableStatement prepareCall(String str, int param, int param2, int param3) throws java.sql.SQLException {
return null;
}
public java.sql.PreparedStatement prepareStatement(String str, String[] str1) throws java.sql.SQLException {
return null;
}
public java.sql.PreparedStatement prepareStatement(String str, int param) throws java.sql.SQLException {
return null;
}
public java.sql.PreparedStatement prepareStatement(String str, int[] values) throws java.sql.SQLException {
return null;
}
public java.sql.PreparedStatement prepareStatement(String str, int param, int param2, int param3) throws java.sql.SQLException {
return null;
}
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException {
}
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException {
}
public void setHoldability(int param) throws java.sql.SQLException {
}
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException {
return null;
}
public java.sql.Savepoint setSavepoint(String str) throws java.sql.SQLException {
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -