Package de.hybris.platform.jdbcwrapper
Class JUnitPreparedStatementImpl
- java.lang.Object
-
- de.hybris.platform.jdbcwrapper.WrapperRelease<java.sql.ResultSet>
-
- de.hybris.platform.jdbcwrapper.StatementImpl
-
- de.hybris.platform.jdbcwrapper.PreparedStatementImpl
-
- de.hybris.platform.jdbcwrapper.JUnitPreparedStatementImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper
public class JUnitPreparedStatementImpl extends PreparedStatementImpl
For testing sql errors while execution.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.jdbcwrapper.StatementImpl
batchStatementsToLog, connection
-
-
Constructor Summary
Constructors Constructor Description JUnitPreparedStatementImpl(ConnectionImpl conn, java.sql.PreparedStatement statement, java.lang.String query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetError(boolean hasError)Allows to force each execution to throw a SQLException.protected java.sql.ResultSetwrapResultSet(java.sql.ResultSet real)returns a wrapped ResultSet-
Methods inherited from class de.hybris.platform.jdbcwrapper.PreparedStatementImpl
addBatch, assembleQueryFromPreparedStatement, clearParameters, execute, executeBatch, executeQuery, executeUpdate, getMetaData, getParameterMetaData, getPreparedQueryWithoutStackTrace, getPrepStmtPassthruString, getResultSet, isLoggingActivated, isPoolable, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setPoolable, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
-
Methods inherited from class de.hybris.platform.jdbcwrapper.StatementImpl
addBatch, addToLogBatchStatements, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isFlexibleSyntax, isWrapperFor, notifyResultSetClosed, releaseResourceImpl, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, unwrap
-
Methods inherited from class de.hybris.platform.jdbcwrapper.WrapperRelease
addResource, releaseResources, removeResource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObject
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setQueryTimeout
-
-
-
-
Constructor Detail
-
JUnitPreparedStatementImpl
public JUnitPreparedStatementImpl(ConnectionImpl conn, java.sql.PreparedStatement statement, java.lang.String query)
-
-
Method Detail
-
setError
public void setError(boolean hasError)
Allows to force each execution to throw a SQLException.- Parameters:
hasError-
-
wrapResultSet
protected java.sql.ResultSet wrapResultSet(java.sql.ResultSet real) throws java.sql.SQLExceptionDescription copied from class:StatementImplreturns a wrapped ResultSet- Overrides:
wrapResultSetin classStatementImpl- Throws:
java.sql.SQLException
-
-