Path: blob/master/test/jdk/java/sql/testng/util/StubStatement.java
41152 views
/*1* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/22package util;2324import java.sql.Connection;25import java.sql.ResultSet;26import java.sql.SQLException;27import java.sql.SQLWarning;28import java.sql.Statement;29import java.util.regex.Pattern;30import static java.util.stream.Collectors.joining;3132public class StubStatement implements Statement {3334@Override35public ResultSet executeQuery(String sql) throws SQLException {36throw new UnsupportedOperationException("Not supported yet.");37}3839@Override40public int executeUpdate(String sql) throws SQLException {41throw new UnsupportedOperationException("Not supported yet.");42}4344@Override45public void close() throws SQLException {46throw new UnsupportedOperationException("Not supported yet.");47}4849@Override50public int getMaxFieldSize() throws SQLException {51throw new UnsupportedOperationException("Not supported yet.");52}5354@Override55public void setMaxFieldSize(int max) throws SQLException {56throw new UnsupportedOperationException("Not supported yet.");57}5859@Override60public int getMaxRows() throws SQLException {61throw new UnsupportedOperationException("Not supported yet.");62}6364@Override65public void setMaxRows(int max) throws SQLException {66throw new UnsupportedOperationException("Not supported yet.");67}6869@Override70public void setEscapeProcessing(boolean enable) throws SQLException {71throw new UnsupportedOperationException("Not supported yet.");72}7374@Override75public int getQueryTimeout() throws SQLException {76throw new UnsupportedOperationException("Not supported yet.");77}7879@Override80public void setQueryTimeout(int seconds) throws SQLException {81throw new UnsupportedOperationException("Not supported yet.");82}8384@Override85public void cancel() throws SQLException {86throw new UnsupportedOperationException("Not supported yet.");87}8889@Override90public SQLWarning getWarnings() throws SQLException {91throw new UnsupportedOperationException("Not supported yet.");92}9394@Override95public void clearWarnings() throws SQLException {96throw new UnsupportedOperationException("Not supported yet.");97}9899@Override100public void setCursorName(String name) throws SQLException {101throw new UnsupportedOperationException("Not supported yet.");102}103104@Override105public boolean execute(String sql) throws SQLException {106throw new UnsupportedOperationException("Not supported yet.");107}108109@Override110public ResultSet getResultSet() throws SQLException {111throw new UnsupportedOperationException("Not supported yet.");112}113114@Override115public int getUpdateCount() throws SQLException {116throw new UnsupportedOperationException("Not supported yet.");117}118119@Override120public boolean getMoreResults() throws SQLException {121throw new UnsupportedOperationException("Not supported yet.");122}123124@Override125public void setFetchDirection(int direction) throws SQLException {126throw new UnsupportedOperationException("Not supported yet.");127}128129@Override130public int getFetchDirection() throws SQLException {131throw new UnsupportedOperationException("Not supported yet.");132}133134@Override135public void setFetchSize(int rows) throws SQLException {136throw new UnsupportedOperationException("Not supported yet.");137}138139@Override140public int getFetchSize() throws SQLException {141throw new UnsupportedOperationException("Not supported yet.");142}143144@Override145public int getResultSetConcurrency() throws SQLException {146throw new UnsupportedOperationException("Not supported yet.");147}148149@Override150public int getResultSetType() throws SQLException {151throw new UnsupportedOperationException("Not supported yet.");152}153154@Override155public void addBatch(String sql) throws SQLException {156throw new UnsupportedOperationException("Not supported yet.");157}158159@Override160public void clearBatch() throws SQLException {161throw new UnsupportedOperationException("Not supported yet.");162}163164@Override165public int[] executeBatch() throws SQLException {166throw new UnsupportedOperationException("Not supported yet.");167}168169@Override170public Connection getConnection() throws SQLException {171throw new UnsupportedOperationException("Not supported yet.");172}173174@Override175public boolean getMoreResults(int current) throws SQLException {176throw new UnsupportedOperationException("Not supported yet.");177}178179@Override180public ResultSet getGeneratedKeys() throws SQLException {181throw new UnsupportedOperationException("Not supported yet.");182}183184@Override185public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {186throw new UnsupportedOperationException("Not supported yet.");187}188189@Override190public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {191throw new UnsupportedOperationException("Not supported yet.");192}193194@Override195public int executeUpdate(String sql, String[] columnNames) throws SQLException {196throw new UnsupportedOperationException("Not supported yet.");197}198199@Override200public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {201throw new UnsupportedOperationException("Not supported yet.");202}203204@Override205public boolean execute(String sql, int[] columnIndexes) throws SQLException {206throw new UnsupportedOperationException("Not supported yet.");207}208209@Override210public boolean execute(String sql, String[] columnNames) throws SQLException {211throw new UnsupportedOperationException("Not supported yet.");212}213214@Override215public int getResultSetHoldability() throws SQLException {216throw new UnsupportedOperationException("Not supported yet.");217}218219@Override220public boolean isClosed() throws SQLException {221throw new UnsupportedOperationException("Not supported yet.");222}223224@Override225public void setPoolable(boolean poolable) throws SQLException {226throw new UnsupportedOperationException("Not supported yet.");227}228229@Override230public boolean isPoolable() throws SQLException {231throw new UnsupportedOperationException("Not supported yet.");232}233234@Override235public void closeOnCompletion() throws SQLException {236throw new UnsupportedOperationException("Not supported yet.");237}238239@Override240public boolean isCloseOnCompletion() throws SQLException {241throw new UnsupportedOperationException("Not supported yet.");242}243244@Override245public <T> T unwrap(Class<T> iface) throws SQLException {246throw new UnsupportedOperationException("Not supported yet.");247}248249@Override250public boolean isWrapperFor(Class<?> iface) throws SQLException {251throw new UnsupportedOperationException("Not supported yet.");252}253254255256}257258259