Package com.landawn.abacus.jdbc
Class PreparedCallableQuery
java.lang.Object
com.landawn.abacus.jdbc.AbstractPreparedQuery<CallableStatement,PreparedCallableQuery>
com.landawn.abacus.jdbc.PreparedCallableQuery
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class PreparedCallableQuery
extends AbstractPreparedQuery<CallableStatement,PreparedCallableQuery>
The backed
Generally, don't cache or reuse the instance of this class, except the
The
Remember: parameter/column index in
PreparedStatement/CallableStatement
will be closed by default
after any execution methods(which will trigger the backed PreparedStatement/CallableStatement
to be executed, for example: get/query/queryForInt/Long/../findFirst/findOnlyOne/list/execute/...).
except the 'closeAfterExecution'
flag is set to false
by calling #closeAfterExecution(false)
.
Generally, don't cache or reuse the instance of this class, except the
'closeAfterExecution'
flag is set to false
by calling #closeAfterExecution(false)
.
The
ResultSet
returned by query will always be closed after execution, even 'closeAfterExecution'
flag is set to false
.
Remember: parameter/column index in
PreparedStatement/ResultSet
starts from 1, not 0.-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeThenAccept
(com.landawn.abacus.util.Throwables.BiConsumer<Boolean, ? super CallableStatement, SQLException> consumer) Execute then accept.void
executeThenAccept
(com.landawn.abacus.util.Throwables.Consumer<? super CallableStatement, SQLException> consumer) Execute then accept.void
executeThenAccept
(com.landawn.abacus.util.Throwables.TriConsumer<Boolean, List<Jdbc.OutParam>, ? super CallableStatement, SQLException> consumer) Execute then apply.<R> R
executeThenApply
(com.landawn.abacus.util.Throwables.BiFunction<Boolean, ? super CallableStatement, ? extends R, SQLException> getter) Execute then apply.<R> R
executeThenApply
(com.landawn.abacus.util.Throwables.Function<? super CallableStatement, ? extends R, SQLException> getter) Execute then apply.<R> R
executeThenApply
(com.landawn.abacus.util.Throwables.TriFunction<Boolean, List<Jdbc.OutParam>, ? super CallableStatement, ? extends R, SQLException> getter) Execute then apply.<T> List<T>
listAll
(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) <T> List<T>
listAll
(Jdbc.BiRowMapper<? extends T> rowMapper) <T> List<T>
listAll
(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) <T> List<T>
listAll
(Jdbc.RowMapper<? extends T> rowMapper) <T> List<T>
<T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAllAndGetOutParameters
(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAllAndGetOutParameters
(Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAllAndGetOutParameters
(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAllAndGetOutParameters
(Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAllAndGetOutParameters
(Class<? extends T> targetType) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAndGetOutParameters
(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAndGetOutParameters
(Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAndGetOutParameters
(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAndGetOutParameters
(Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,
Jdbc.OutParamResult> listAndGetOutParameters
(Class<? extends T> targetType) <R1,
R2> com.landawn.abacus.util.Tuple.Tuple2<R1, R2> query2
(Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2) <R1,
R2> com.landawn.abacus.util.Tuple.Tuple3<R1, R2, Jdbc.OutParamResult> query2AndGetOutParameters
(Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2) <R1,
R2, R3> com.landawn.abacus.util.Tuple.Tuple3<R1, R2, R3> query3
(Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2, Jdbc.BiResultExtractor<? extends R3> resultExtractor3) <R1,
R2, R3> com.landawn.abacus.util.Tuple.Tuple4<R1, R2, R3, Jdbc.OutParamResult> query3AndGetOutParameters
(Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2, Jdbc.BiResultExtractor<? extends R3> resultExtractor3) List<com.landawn.abacus.util.DataSet>
queryAll()
<R> List<R>
queryAll
(Jdbc.BiResultExtractor<? extends R> resultExtractor) <R> List<R>
queryAll
(Jdbc.ResultExtractor<? extends R> resultExtractor) com.landawn.abacus.util.Tuple.Tuple2<List<com.landawn.abacus.util.DataSet>,
Jdbc.OutParamResult> <R> com.landawn.abacus.util.Tuple.Tuple2<List<R>,
Jdbc.OutParamResult> queryAllAndGetOutParameters
(Jdbc.BiResultExtractor<? extends R> resultExtractor) <R> com.landawn.abacus.util.Tuple.Tuple2<List<R>,
Jdbc.OutParamResult> queryAllAndGetOutParameters
(Jdbc.ResultExtractor<? extends R> resultExtractor) com.landawn.abacus.util.Tuple.Tuple2<com.landawn.abacus.util.DataSet,
Jdbc.OutParamResult> <R> com.landawn.abacus.util.Tuple.Tuple2<R,
Jdbc.OutParamResult> queryAndGetOutParameters
(Jdbc.BiResultExtractor<? extends R> resultExtractor) <R> com.landawn.abacus.util.Tuple.Tuple2<R,
Jdbc.OutParamResult> queryAndGetOutParameters
(Jdbc.ResultExtractor<? extends R> resultExtractor) registerOutParameter
(int parameterIndex, int sqlType) Register out parameter.registerOutParameter
(int parameterIndex, int sqlType, int scale) Register out parameter.registerOutParameter
(int parameterIndex, int sqlType, String typeName) Register out parameter.registerOutParameter
(int parameterIndex, SQLType sqlType) Register out parameter.registerOutParameter
(int parameterIndex, SQLType sqlType, int scale) Register out parameter.registerOutParameter
(int parameterIndex, SQLType sqlType, String typeName) Register out parameter.registerOutParameter
(String parameterName, int sqlType) Register out parameter.registerOutParameter
(String parameterName, int sqlType, int scale) Register out parameter.registerOutParameter
(String parameterName, int sqlType, String typeName) Register out parameter.registerOutParameter
(String parameterName, SQLType sqlType) Register out parameter.registerOutParameter
(String parameterName, SQLType sqlType, int scale) Register out parameter.registerOutParameter
(String parameterName, SQLType sqlType, String typeName) Register out parameter.registerOutParameters
(Jdbc.ParametersSetter<? super PreparedCallableQuery> register) Register out parameters.registerOutParameters
(T parameter, Jdbc.BiParametersSetter<? super PreparedCallableQuery, ? super T> register) Register out parameters.setAsciiStream
(String parameterName, InputStream inputStream) Sets the ascii stream.setAsciiStream
(String parameterName, InputStream inputStream, long length) Sets the ascii stream.setBigDecimal
(String parameterName, BigDecimal x) Sets the big decimal.setBigDecimal
(String parameterName, BigInteger x) Sets the big decimal.setBigIntegerAsString
(String parameterName, BigInteger x) Sets the BigInteger.setBinaryStream
(String parameterName, InputStream inputStream) Sets the binary stream.setBinaryStream
(String parameterName, InputStream inputStream, long length) Sets the binary stream.setBlob
(String parameterName, InputStream inputStream) Sets the blob.setBlob
(String parameterName, InputStream inputStream, long length) Sets the blob.Sets the blob.setBoolean
(String parameterName, boolean x) Sets the boolean.setBoolean
(String parameterName, Boolean x) Sets the boolean.Sets the byte.Sets the byte.Sets the bytes.setCharacterStream
(String parameterName, Reader reader) Sets the character stream.setCharacterStream
(String parameterName, Reader reader, long length) Sets the character stream.Sets the clob.Sets the clob.Sets the clob.Sets the date.Sets the date.Sets the double.Sets the double.Sets the float.Sets the float.Sets the int.Sets the int.Sets the long.Sets the long.setLong
(String parameterName, BigInteger x) Sets the long.setNCharacterStream
(String parameterName, Reader reader) Sets the N character stream.setNCharacterStream
(String parameterName, Reader reader, long length) Sets the N character stream.Sets the N clob.Sets the N clob.Sets the N clob.setNString
(String parameterName, String x) Sets the string.Sets the null.Sets the null.Sets the object.Sets the object.Sets the object.setParameters
(Object entity, List<String> parameterNames) Sets the parameters.setParameters
(Map<String, ?> parameters) Sets the parameters.Sets the short.Sets the short.setString
(String parameterName, CharSequence x) Sets the string.Sets the string.setString
(String parameterName, BigInteger x) Sets the string.Sets the time.Sets the time.setTimestamp
(String parameterName, Timestamp x) Sets the timestamp.setTimestamp
(String parameterName, Date x) Sets the timestamp.<T> com.landawn.abacus.util.ExceptionalStream<T,
SQLException> streamAll
(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.ExceptionalStream<T,
SQLException> streamAll
(Jdbc.BiRowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.ExceptionalStream<T,
SQLException> streamAll
(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.ExceptionalStream<T,
SQLException> streamAll
(Jdbc.RowMapper<? extends T> rowMapper) <T> com.landawn.abacus.util.ExceptionalStream<T,
SQLException> Methods inherited from class com.landawn.abacus.jdbc.AbstractPreparedQuery
addBatch, addBatchParameters, addBatchParameters, addBatchParameters, addBatchParameters, addBatchParameters, addBatchParameters, addBatchParameters, addBatchParameters, allMatch, allMatch, anyMatch, anyMatch, asyncCall, asyncCall, asyncRun, asyncRun, batchInsert, batchInsert, batchInsert, batchUpdate, batchUpdateAndReturnGeneratedKeys, batchUpdateAndReturnGeneratedKeys, close, closeAfterExecution, configStmt, configStmt, count, count, count, execute, exists, findFirst, findFirst, findFirst, findFirst, findFirst, findFirst, findFirstOrNull, findFirstOrNull, findFirstOrNull, findFirstOrNull, findFirstOrNull, findFirstOrNull, findOnlyOne, findOnlyOne, findOnlyOne, findOnlyOne, findOnlyOneOrNull, findOnlyOneOrNull, findOnlyOneOrNull, findOnlyOneOrNull, foreach, foreach, forEach, forEach, forEach, forEach, ifExists, ifExists, ifExistsOrElse, ifExistsOrElse, insert, insert, insert, largeBatchUpdate, largeUpdate, list, list, list, list, list, list, list, list, list, list, list, listThenApply, listThenApply, listThenApply, noneMatch, noneMatch, notExists, onClose, query, query, query, query, queryForBigDecimal, queryForBigInteger, queryForBoolean, queryForByte, queryForBytes, queryForChar, queryForDate, queryForDouble, queryForFloat, queryForInt, queryForLong, queryForShort, queryForSingleNonNull, queryForSingleNonNull, queryForSingleResult, queryForSingleResult, queryForString, queryForTime, queryForTimestamp, queryForUniqueNonNull, queryForUniqueNonNull, queryForUniqueResult, queryForUniqueResult, queryThenAccept, queryThenAccept, queryThenApply, queryThenApply, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBigIntegerAsString, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setBoolean, setBooleanForMultiPositions, setByte, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDate, setDateForMultiPositions, setDateForMultiPositions, setDouble, setDouble, setDoubleForMultiPositions, setDoubleForMultiPositions, setFetchDirection, setFetchDirectionToForward, setFetchSize, setFloat, setFloat, setInt, setInt, setInt, setInt, setIntegerForMultiPositions, setIntForMultiPositions, setLargeMaxRows, setLong, setLong, setLong, setLongForMultiPositions, setLongForMultiPositions, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setNullForMultiPositions, setObject, setObject, setObject, setObject, setObject, setObject, setObjectForMultiPositions, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setParameters, setQueryTimeout, setRef, setRowId, setShort, setShort, setSQLXML, setString, setString, setString, setString, setString, setStringForMultiPositions, setTime, setTime, setTime, setTimeForMultiPositions, setTimeForMultiPositions, setTimestamp, setTimestamp, setTimestamp, setTimestampForMultiPositions, setTimestampForMultiPositions, settParameters, settParameters, settParameters, settParameters, settParameters, settParameters, settParameters, settParameters, setURL, stream, stream, stream, stream, stream, stream, update, updateAndReturnGeneratedKeys, updateAndReturnGeneratedKeys
-
Method Details
-
setNull
Sets the null.- Parameters:
parameterName
-sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
setNull
public PreparedCallableQuery setNull(String parameterName, int sqlType, String typeName) throws SQLException Sets the null.- Parameters:
parameterName
-sqlType
-typeName
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
setBoolean
Sets the boolean.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBoolean
Sets the boolean.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setByte
Sets the byte.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setByte
Sets the byte.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setShort
Sets the short.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setShort
Sets the short.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setInt
Sets the int.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setInt
Sets the int.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setLong
Sets the long.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setLong
Sets the long.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setLong
Sets the long.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setFloat
Sets the float.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setFloat
Sets the float.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setDouble
Sets the double.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setDouble
Sets the double.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBigDecimal
Sets the big decimal.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBigDecimal
Sets the big decimal.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBigIntegerAsString
@Beta public PreparedCallableQuery setBigIntegerAsString(String parameterName, BigInteger x) throws SQLException Sets the BigInteger.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
-
setString
Sets the string.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setString
Sets the string.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setString
- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
-
setString
- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
-
setString
Sets the string.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNString
Sets the string.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setDate
Sets the date.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setDate
Sets the date.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setTime
Sets the time.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setTime
Sets the time.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setTimestamp
Sets the timestamp.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setTimestamp
Sets the timestamp.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBytes
Sets the bytes.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setAsciiStream
public PreparedCallableQuery setAsciiStream(String parameterName, InputStream inputStream) throws SQLException Sets the ascii stream.- Parameters:
parameterName
-inputStream
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setAsciiStream
public PreparedCallableQuery setAsciiStream(String parameterName, InputStream inputStream, long length) throws SQLException Sets the ascii stream.- Parameters:
parameterName
-inputStream
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBinaryStream
public PreparedCallableQuery setBinaryStream(String parameterName, InputStream inputStream) throws SQLException Sets the binary stream.- Parameters:
parameterName
-inputStream
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBinaryStream
public PreparedCallableQuery setBinaryStream(String parameterName, InputStream inputStream, long length) throws SQLException Sets the binary stream.- Parameters:
parameterName
-inputStream
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setCharacterStream
public PreparedCallableQuery setCharacterStream(String parameterName, Reader reader) throws SQLException Sets the character stream.- Parameters:
parameterName
-reader
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setCharacterStream
public PreparedCallableQuery setCharacterStream(String parameterName, Reader reader, long length) throws SQLException Sets the character stream.- Parameters:
parameterName
-reader
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNCharacterStream
public PreparedCallableQuery setNCharacterStream(String parameterName, Reader reader) throws SQLException Sets the N character stream.- Parameters:
parameterName
-reader
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNCharacterStream
public PreparedCallableQuery setNCharacterStream(String parameterName, Reader reader, long length) throws SQLException Sets the N character stream.- Parameters:
parameterName
-reader
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBlob
Sets the blob.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBlob
public PreparedCallableQuery setBlob(String parameterName, InputStream inputStream) throws SQLException Sets the blob.- Parameters:
parameterName
-inputStream
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setBlob
public PreparedCallableQuery setBlob(String parameterName, InputStream inputStream, long length) throws SQLException Sets the blob.- Parameters:
parameterName
-inputStream
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setClob
Sets the clob.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setClob
Sets the clob.- Parameters:
parameterName
-reader
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setClob
public PreparedCallableQuery setClob(String parameterName, Reader reader, long length) throws SQLException Sets the clob.- Parameters:
parameterName
-reader
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNClob
Sets the N clob.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNClob
Sets the N clob.- Parameters:
parameterName
-reader
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setNClob
public PreparedCallableQuery setNClob(String parameterName, Reader reader, long length) throws SQLException Sets the N clob.- Parameters:
parameterName
-reader
-length
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setURL
- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setSQLXML
- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setRowId
- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setObject
Sets the object.- Parameters:
parameterName
-x
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setObject
public PreparedCallableQuery setObject(String parameterName, Object x, int sqlType) throws SQLException Sets the object.- Parameters:
parameterName
-x
-sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
setObject
public PreparedCallableQuery setObject(String parameterName, Object x, int sqlType, int scaleOrLength) throws SQLException Sets the object.- Parameters:
parameterName
-x
-sqlType
-scaleOrLength
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
setParameters
Sets the parameters.- Parameters:
parameters
-- Returns:
- Throws:
SQLException
- the SQL exception
-
setParameters
public PreparedCallableQuery setParameters(Object entity, List<String> parameterNames) throws SQLException Sets the parameters.- Parameters:
entity
-parameterNames
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, int sqlType) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-scale
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-typeName
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, int sqlType) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-scale
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-typeName
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-scale
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException Register out parameter.- Parameters:
parameterIndex
- starts from 1, not 0.sqlType
-typeName
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, SQLType sqlType) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-scale
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameter
public PreparedCallableQuery registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException Register out parameter.- Parameters:
parameterName
-sqlType
-typeName
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameters
public PreparedCallableQuery registerOutParameters(Jdbc.ParametersSetter<? super PreparedCallableQuery> register) throws SQLException Register out parameters.- Parameters:
register
-- Returns:
- Throws:
SQLException
- the SQL exception
-
registerOutParameters
public <T> PreparedCallableQuery registerOutParameters(T parameter, Jdbc.BiParametersSetter<? super PreparedCallableQuery, ? super T> register) throws SQLExceptionRegister out parameters.- Type Parameters:
T
-- Parameters:
parameter
-register
-- Returns:
- Throws:
SQLException
- the SQL exception
-
executeThenApply
public <R> R executeThenApply(com.landawn.abacus.util.Throwables.Function<? super CallableStatement, ? extends R, throws SQLExceptionSQLException> getter) Execute then apply.- Overrides:
executeThenApply
in classAbstractPreparedQuery<CallableStatement,
PreparedCallableQuery> - Type Parameters:
R
-- Parameters:
getter
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeThenApply
public <R> R executeThenApply(com.landawn.abacus.util.Throwables.BiFunction<Boolean, ? super CallableStatement, throws SQLException? extends R, SQLException> getter) Execute then apply.- Overrides:
executeThenApply
in classAbstractPreparedQuery<CallableStatement,
PreparedCallableQuery> - Type Parameters:
R
-- Parameters:
getter
-- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeThenApply
public <R> R executeThenApply(com.landawn.abacus.util.Throwables.TriFunction<Boolean, List<Jdbc.OutParam>, throws SQLException? super CallableStatement, ? extends R, SQLException> getter) Execute then apply.- Type Parameters:
R
-- Parameters:
getter
- the first parameter isisFirstResultSet
, the second one isoutParametes
and third one is the executedCallableStatement
.- Returns:
- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeThenAccept
public void executeThenAccept(com.landawn.abacus.util.Throwables.Consumer<? super CallableStatement, SQLException> consumer) throws SQLExceptionExecute then accept.- Overrides:
executeThenAccept
in classAbstractPreparedQuery<CallableStatement,
PreparedCallableQuery> - Parameters:
consumer
-- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeThenAccept
public void executeThenAccept(com.landawn.abacus.util.Throwables.BiConsumer<Boolean, ? super CallableStatement, throws SQLExceptionSQLException> consumer) Execute then accept.- Overrides:
executeThenAccept
in classAbstractPreparedQuery<CallableStatement,
PreparedCallableQuery> - Parameters:
consumer
-- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeThenAccept
public void executeThenAccept(com.landawn.abacus.util.Throwables.TriConsumer<Boolean, List<Jdbc.OutParam>, throws SQLException? super CallableStatement, SQLException> consumer) Execute then apply.- Parameters:
consumer
- the first parameter isisFirstResultSet
, the second one isoutParametes
and third one is the executedCallableStatement
.- Throws:
SQLException
- the SQL exception- See Also:
-
JdbcUtil#getOutParameters(CallableStatement, int)
JdbcUtil.streamAllResultSets(java.sql.Statement, RowMapper)
JdbcUtil.streamAllResultSets(java.sql.Statement, BiRowMapper)
-
executeAndGetOutParameters
- Returns:
- a list of
Out Parameters
. - Throws:
SQLException
-
queryAll
- Returns:
- a list of
DataSet
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAll
- Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- a list of
R
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAll
public <R> List<R> queryAll(Jdbc.BiResultExtractor<? extends R> resultExtractor) throws SQLException - Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- a list of
R
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAndGetOutParameters
public com.landawn.abacus.util.Tuple.Tuple2<com.landawn.abacus.util.DataSet,Jdbc.OutParamResult> queryAndGetOutParameters() throws SQLException- Returns:
- the
DataSet
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAndGetOutParameters
public <R> com.landawn.abacus.util.Tuple.Tuple2<R,Jdbc.OutParamResult> queryAndGetOutParameters(Jdbc.ResultExtractor<? extends R> resultExtractor) throws SQLException - Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- the
R
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAndGetOutParameters
public <R> com.landawn.abacus.util.Tuple.Tuple2<R,Jdbc.OutParamResult> queryAndGetOutParameters(Jdbc.BiResultExtractor<? extends R> resultExtractor) throws SQLException - Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- the
R
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAllAndGetOutParameters
public com.landawn.abacus.util.Tuple.Tuple2<List<com.landawn.abacus.util.DataSet>,Jdbc.OutParamResult> queryAllAndGetOutParameters() throws SQLException- Returns:
- a list of
DataSet
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAllAndGetOutParameters
public <R> com.landawn.abacus.util.Tuple.Tuple2<List<R>,Jdbc.OutParamResult> queryAllAndGetOutParameters(Jdbc.ResultExtractor<? extends R> resultExtractor) throws SQLException - Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- a list of
R
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
queryAllAndGetOutParameters
public <R> com.landawn.abacus.util.Tuple.Tuple2<List<R>,Jdbc.OutParamResult> queryAllAndGetOutParameters(Jdbc.BiResultExtractor<? extends R> resultExtractor) throws SQLException - Type Parameters:
R
-- Parameters:
resultExtractor
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
- a list of
R
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
query2
public <R1,R2> com.landawn.abacus.util.Tuple.Tuple2<R1,R2> query2(Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2) throws SQLException - Type Parameters:
R1
-R2
-- Parameters:
resultExtractor1
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor2
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
R1/R2
extracted from the first twoResultSets
returned by the executed procedure.- Throws:
SQLException
-
query2AndGetOutParameters
public <R1,R2> com.landawn.abacus.util.Tuple.Tuple3<R1,R2, query2AndGetOutParametersJdbc.OutParamResult> (Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2) throws SQLException - Type Parameters:
R1
-R2
-- Parameters:
resultExtractor1
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor2
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
R1/R2
extracted from the first twoResultSets
returned by the executed procedure and a list ofOut Parameters
.- Throws:
SQLException
-
query3
public <R1,R2, com.landawn.abacus.util.Tuple.Tuple3<R1,R3> R2, query3R3> (Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2, Jdbc.BiResultExtractor<? extends R3> resultExtractor3) throws SQLException - Type Parameters:
R1
-R2
-R3
-- Parameters:
resultExtractor1
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor2
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor3
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
R1/R2/R3
extracted from the first threeResultSets
returned by the executed procedure.- Throws:
SQLException
-
query3AndGetOutParameters
public <R1,R2, com.landawn.abacus.util.Tuple.Tuple4<R1,R3> R2, query3AndGetOutParametersR3, Jdbc.OutParamResult> (Jdbc.BiResultExtractor<? extends R1> resultExtractor1, Jdbc.BiResultExtractor<? extends R2> resultExtractor2, Jdbc.BiResultExtractor<? extends R3> resultExtractor3) throws SQLException - Type Parameters:
R1
-R2
-R3
-- Parameters:
resultExtractor1
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor2
- Don't save/returnResultSet
. It will be closed after this call.resultExtractor3
- Don't save/returnResultSet
. It will be closed after this call.- Returns:
R1/R2/R3
extracted from the first threeResultSets
returned by the executed procedure and a list ofOut Parameters
.- Throws:
SQLException
-
listAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAndGetOutParameters(Class<? extends T> targetType) throws SQLException - Type Parameters:
T
-- Parameters:
targetType
-- Returns:
- the
List<T>
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAndGetOutParameters(Jdbc.RowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAndGetOutParameters(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAndGetOutParameters(Jdbc.BiRowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAndGetOutParameters(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from firstResultSet
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAll
- Type Parameters:
T
-- Parameters:
targetType
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure. - Throws:
SQLException
-
listAll
- Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure. - Throws:
SQLException
-
listAll
public <T> List<T> listAll(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure. - Throws:
SQLException
-
listAll
- Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure. - Throws:
SQLException
-
listAll
public <T> List<T> listAll(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure. - Throws:
SQLException
-
listAllAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAllAndGetOutParameters(Class<? extends T> targetType) throws SQLException - Type Parameters:
T
-- Parameters:
targetType
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAllAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAllAndGetOutParameters(Jdbc.RowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAllAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAllAndGetOutParameters(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAllAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAllAndGetOutParameters(Jdbc.BiRowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
listAllAndGetOutParameters
public <T> com.landawn.abacus.util.Tuple.Tuple2<List<T>,Jdbc.OutParamResult> listAllAndGetOutParameters(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) throws SQLException - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
List<T>
extracted from allResultSets
returned by the executed procedure and a list ofOut Parameters
. - Throws:
SQLException
-
streamAll
public <T> com.landawn.abacus.util.ExceptionalStream<T,SQLException> streamAll(Class<? extends T> targetType) - Type Parameters:
T
-- Parameters:
targetType
-- Returns:
- the
ExceptionalStream<T>
extracted from allResultSets
returned by the executed procedure.
-
streamAll
public <T> com.landawn.abacus.util.ExceptionalStream<T,SQLException> streamAll(Jdbc.RowMapper<? extends T> rowMapper) - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
ExceptionalStream<T>
extracted from allResultSets
returned by the executed procedure.
-
streamAll
public <T> com.landawn.abacus.util.ExceptionalStream<T,SQLException> streamAll(Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends T> rowMapper) - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
ExceptionalStream<T>
extracted from allResultSets
returned by the executed procedure.
-
streamAll
public <T> com.landawn.abacus.util.ExceptionalStream<T,SQLException> streamAll(Jdbc.BiRowMapper<? extends T> rowMapper) - Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
- the
ExceptionalStream<T>
extracted from allResultSets
returned by the executed procedure.
-
streamAll
public <T> com.landawn.abacus.util.ExceptionalStream<T,SQLException> streamAll(Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends T> rowMapper) - Type Parameters:
T
-- Parameters:
rowFilter
-rowMapper
-- Returns:
- the
ExceptionalStream<T>
extracted from allResultSets
returned by the executed procedure.
-