ShardDataSourceProxyStatement implements Statement { public boolean isCloseOnCompletion() throws SQLException { return (Boolean)JdbcMethodUtils.invokeJdbcMethod(Statement.class,"isCloseOnCompletion",new Class<?>[0],targetStatement,new Object[0]); } ShardDataSourceProxyStatement(Statement statement, ShardDataSourceProxyConnection shardProxyConnection); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface); @Override ResultSet executeQuery(String sql); @Override int executeUpdate(String sql); @Override void close(); @Override int getMaxFieldSize(); @Override void setMaxFieldSize(int max); @Override int getMaxRows(); @Override void setMaxRows(int max); @Override void setEscapeProcessing(boolean enable); @Override int getQueryTimeout(); @Override void setQueryTimeout(int seconds); @Override void cancel(); @Override SQLWarning getWarnings(); @Override void clearWarnings(); @Override void setCursorName(String name); @Override boolean execute(String sql); @Override ResultSet getResultSet(); @Override int getUpdateCount(); @Override boolean getMoreResults(); @Override void setFetchDirection(int direction); @Override int getFetchDirection(); @Override void setFetchSize(int rows); @Override int getFetchSize(); @Override int getResultSetConcurrency(); @Override int getResultSetType(); @Override void addBatch(String sql); @Override void clearBatch(); @Override int[] executeBatch(); @Override Connection getConnection(); @Override boolean getMoreResults(int current); @Override ResultSet getGeneratedKeys(); @Override int executeUpdate(String sql, int autoGeneratedKeys); @Override int executeUpdate(String sql, int[] columnIndexes); @Override int executeUpdate(String sql, String[] columnNames); @Override boolean execute(String sql, int autoGeneratedKeys); @Override boolean execute(String sql, int[] columnIndexes); @Override boolean execute(String sql, String[] columnNames); @Override int getResultSetHoldability(); @Override boolean isClosed(); @Override void setPoolable(boolean poolable); @Override boolean isPoolable(); void closeOnCompletion(); boolean isCloseOnCompletion();  }
@Test public void testIsCloseOnCompletion() throws Exception { int[] count=new int[1]; boolean result=true; ShardDataSourceProxyStatement statement=new ShardDataSourceProxyStatement( this.createStatement(count, "isCloseOnCompletion", result), null); assertTrue(statement.isCloseOnCompletion()==result); assertTrue(count[0]==1); }