Neo4jCallableStatement extends Neo4jPreparedStatement implements java.sql.CallableStatement { @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { return org.neo4j.jdbc.Wrapper.isWrapperFor(iface, this.getClass()); } protected  Neo4jCallableStatement(Neo4jConnection connection, String rawStatement); @Override SQLWarning getWarnings(); @Override void clearWarnings(); @Override void registerOutParameter(int parameterIndex, int sqlType); @Override void registerOutParameter(int parameterIndex, int sqlType, int scale); @Override boolean wasNull(); @Override String getString(int parameterIndex); @Override boolean getBoolean(int parameterIndex); @Override byte getByte(int parameterIndex); @Override short getShort(int parameterIndex); @Override int getInt(int parameterIndex); @Override long getLong(int parameterIndex); @Override float getFloat(int parameterIndex); @Override double getDouble(int parameterIndex); @Override BigDecimal getBigDecimal(int parameterIndex, int scale); @Override byte[] getBytes(int parameterIndex); @Override Date getDate(int parameterIndex); @Override Time getTime(int parameterIndex); @Override Timestamp getTimestamp(int parameterIndex); @Override Object getObject(int parameterIndex); @Override BigDecimal getBigDecimal(int parameterIndex); @Override Object getObject(int parameterIndex, Map<String, Class<?>> map); @Override Ref getRef(int parameterIndex); @Override Blob getBlob(int parameterIndex); @Override Clob getClob(int parameterIndex); @Override Neo4jArray getArray(int parameterIndex); @Override Date getDate(int parameterIndex, Calendar cal); @Override Time getTime(int parameterIndex, Calendar cal); @Override Timestamp getTimestamp(int parameterIndex, Calendar cal); @Override void registerOutParameter(int parameterIndex, int sqlType, String typeName); @Override void registerOutParameter(String parameterName, int sqlType); @Override void registerOutParameter(String parameterName, int sqlType, int scale); @Override void registerOutParameter(String parameterName, int sqlType, String typeName); @Override URL getURL(int parameterIndex); @Override void setURL(String parameterName, URL val); @Override void setNull(String parameterName, int sqlType); @Override void setBoolean(String parameterName, boolean x); @Override void setByte(String parameterName, byte x); @Override void setShort(String parameterName, short x); @Override void setInt(String parameterName, int x); @Override void setLong(String parameterName, long x); @Override void setFloat(String parameterName, float x); @Override void setDouble(String parameterName, double x); @Override void setBigDecimal(String parameterName, BigDecimal x); @Override void setString(String parameterName, String x); @Override void setBytes(String parameterName, byte[] x); @Override void setDate(String parameterName, Date x); @Override void setTime(String parameterName, Time x); @Override void setTimestamp(String parameterName, Timestamp x); @Override void setAsciiStream(String parameterName, InputStream x, int length); @Override void setBinaryStream(String parameterName, InputStream x, int length); @Override void setObject(String parameterName, Object x, int targetSqlType, int scale); @Override void setObject(String parameterName, Object x, int targetSqlType); @Override void setObject(String parameterName, Object x); @Override void setCharacterStream(String parameterName, Reader reader, int length); @Override void setDate(String parameterName, Date x, Calendar cal); @Override void setTime(String parameterName, Time x, Calendar cal); @Override void setTimestamp(String parameterName, Timestamp x, Calendar cal); @Override void setNull(String parameterName, int sqlType, String typeName); @Override String getString(String parameterName); @Override boolean getBoolean(String parameterName); @Override byte getByte(String parameterName); @Override short getShort(String parameterName); @Override int getInt(String parameterName); @Override long getLong(String parameterName); @Override float getFloat(String parameterName); @Override double getDouble(String parameterName); @Override byte[] getBytes(String parameterName); @Override Date getDate(String parameterName); @Override Time getTime(String parameterName); @Override Timestamp getTimestamp(String parameterName); @Override Object getObject(String parameterName); @Override BigDecimal getBigDecimal(String parameterName); @Override Object getObject(String parameterName, Map<String, Class<?>> map); @Override Ref getRef(String parameterName); @Override Blob getBlob(String parameterName); @Override Clob getClob(String parameterName); @Override Neo4jArray getArray(String parameterName); @Override Date getDate(String parameterName, Calendar cal); @Override Time getTime(String parameterName, Calendar cal); @Override Timestamp getTimestamp(String parameterName, Calendar cal); @Override URL getURL(String parameterName); @Override RowId getRowId(int parameterIndex); @Override RowId getRowId(String parameterName); @Override void setRowId(String parameterName, RowId x); @Override void setNString(String parameterName, String value); @Override void setNCharacterStream(String parameterName, Reader value, long length); @Override void setNClob(String parameterName, NClob value); @Override void setClob(String parameterName, Reader reader, long length); @Override void setBlob(String parameterName, InputStream inputStream, long length); @Override void setNClob(String parameterName, Reader reader, long length); @Override NClob getNClob(int parameterIndex); @Override NClob getNClob(String parameterName); @Override void setSQLXML(String parameterName, SQLXML xmlObject); @Override SQLXML getSQLXML(int parameterIndex); @Override SQLXML getSQLXML(String parameterName); @Override String getNString(int parameterIndex); @Override String getNString(String parameterName); @Override Reader getNCharacterStream(int parameterIndex); @Override Reader getNCharacterStream(String parameterName); @Override Reader getCharacterStream(int parameterIndex); @Override Reader getCharacterStream(String parameterName); @Override void setBlob(String parameterName, Blob x); @Override void setClob(String parameterName, Clob x); @Override void setAsciiStream(String parameterName, InputStream x, long length); @Override void setBinaryStream(String parameterName, InputStream x, long length); @Override void setCharacterStream(String parameterName, Reader reader, long length); @Override void setAsciiStream(String parameterName, InputStream x); @Override void setBinaryStream(String parameterName, InputStream x); @Override void setCharacterStream(String parameterName, Reader reader); @Override void setNCharacterStream(String parameterName, Reader value); @Override void setClob(String parameterName, Reader reader); @Override void setBlob(String parameterName, InputStream inputStream); @Override void setNClob(String parameterName, Reader reader); @Override T getObject(int parameterIndex, Class<T> type); @Override T getObject(String parameterName, Class<T> type); @Override ResultSet executeQuery(); @Override int executeUpdate(); @Override void setNull(int parameterIndex, int sqlType); @Override void setBoolean(int parameterIndex, boolean x); @Override void setByte(int parameterIndex, byte x); @Override void setShort(int parameterIndex, short x); @Override void setInt(int parameterIndex, int x); @Override void setLong(int parameterIndex, long x); @Override void setFloat(int parameterIndex, float x); @Override void setDouble(int parameterIndex, double x); @Override void setBigDecimal(int parameterIndex, BigDecimal x); @Override void setObject(int parameterIndex, Object x, int targetSqlType); @Override void setObject(int parameterIndex, Object x); @Override boolean execute(); @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 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 boolean getMoreResults(int current); @Override boolean isClosed(); @Override void setPoolable(boolean poolable); @Override boolean isPoolable(); @Override void closeOnCompletion(); @Override boolean isCloseOnCompletion(); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface);  }
@Test public void isWrapperForShouldReturnTrue() throws SQLException { Neo4jCallableStatement callableStatement = mock(Neo4jCallableStatement.class, Mockito.CALLS_REAL_METHODS); assertTrue(callableStatement.isWrapperFor(Neo4jCallableStatement.class)); assertTrue(callableStatement.isWrapperFor(java.sql.Statement.class)); assertTrue(callableStatement.isWrapperFor(java.sql.CallableStatement.class)); assertTrue(callableStatement.isWrapperFor(java.sql.PreparedStatement.class)); assertTrue(callableStatement.isWrapperFor(java.sql.Wrapper.class)); }
@Test public void isWrapperForShouldReturnFalse() throws SQLException { Neo4jCallableStatement callableStatement = mock(Neo4jCallableStatement.class, Mockito.CALLS_REAL_METHODS); assertFalse(callableStatement.isWrapperFor(Neo4jResultSet.class)); assertFalse(callableStatement.isWrapperFor(java.sql.Driver.class)); assertFalse(callableStatement.isWrapperFor(Neo4jResultSet.class)); assertFalse(callableStatement.isWrapperFor(java.sql.ResultSet.class)); }