Package org.jdbi.v3.core.statement
Class OutParameters
java.lang.Object
org.jdbi.v3.core.statement.OutParameters
Holds all output parameters from a stored procedure call using
Call
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes
(int pos) Retrieves an out parameter as a byte array.byte[]
Retrieves an out parameter as a byte array.getDate
(int pos) Retrieves an out parameter as aDate
object.Retrieves an out parameter as aDate
object.getDouble
(int pos) Retrieves an out parameter as a Double object.Retrieves an out parameter as a Double object.double
getDoubleValue
(int pos) Retrieves an out parameter as a double value.double
getDoubleValue
(String name) Retrieves an out parameter as a double value.getFloat
(int pos) Retrieves an out parameter as a Float object.Retrieves an out parameter as a Float object.float
getFloatValue
(int pos) Retrieves an out parameter as a float value.float
getFloatValue
(String name) Retrieves an out parameter as a float value.getInt
(int pos) Retrieves an out parameter as a Integer object.Retrieves an out parameter as a Integer object.int
getIntValue
(int pos) Retrieves an out parameter as a int value.int
getIntValue
(String name) Retrieves an out parameter as a int value.getLong
(int pos) Retrieves an out parameter as a Long object.Retrieves an out parameter as a Long object.long
getLongValue
(int pos) Retrieves an out parameter as a long value.long
getLongValue
(String name) Retrieves an out parameter as a long value.getObject
(int pos) Retrieves an out parameter as an object.<T> T
Retrieves an out parameter and casts it to a specific type.Retrieves an out parameter as an object.<T> T
Retrieves an out parameter and casts it to a specific type.Returns aResultBearing
backed by the main result set returned by the procedure.getRowSet
(int pos) Retrieves aResultBearing
for an out parameter.Retrieves aResultBearing
for an out parameter.getShort
(int pos) Retrieves an out parameter as a Short object.Retrieves an out parameter as a Short object.short
getShortValue
(int pos) Retrieves an out parameter as a short value.short
getShortValue
(String name) Retrieves an out parameter as a short value.getString
(int pos) Retrieves an out parameter as a string.Retrieves an out parameter as a string.getTimestamp
(int pos) Retrieves an out parameter as aTimestamp
object.getTimestamp
(String name) Retrieves an out parameter as aTimestamp
object.
-
Method Details
-
getResultSet
Returns aResultBearing
backed by the main result set returned by the procedure. This is not supported by all databases.- Returns:
- A
ResultBearing
. This is never null but may be empty. - Since:
- 3.43.0
-
getObject
Retrieves an out parameter and casts it to a specific type.- Type Parameters:
T
- the output parameter type- Parameters:
name
- The out parameter nametype
- The java type to obtain- Returns:
- the output of name as type T
- Throws:
ClassCastException
- If the parameter can not be cast to type T
-
getObject
Retrieves an out parameter and casts it to a specific type.- Type Parameters:
T
- the output parameter type- Parameters:
pos
- The out parameter indextype
- The java type to obtain- Returns:
- the output of name as type T
- Throws:
ClassCastException
- If the parameter can not be cast to type T
-
getObject
Retrieves an out parameter as an object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Object. Can be null.
-
getObject
Retrieves an out parameter as an object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Object. Can be null.
-
getString
Retrieves an out parameter as a string.- Parameters:
name
- The out parameter name- Returns:
- The value as a String. Can be null.
-
getString
Retrieves an out parameter as a string.- Parameters:
pos
- The out parameter index- Returns:
- The value as a String. Can be null.
-
getBytes
Retrieves an out parameter as a byte array.- Parameters:
name
- The out parameter name- Returns:
- The value as a byte array. Can be null.
-
getBytes
@Nullable public byte[] getBytes(int pos) Retrieves an out parameter as a byte array.- Parameters:
pos
- The out parameter index- Returns:
- The value as a byte array. Can be null.
-
getInt
Retrieves an out parameter as a Integer object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Integer object. Can be null.
-
getInt
Retrieves an out parameter as a Integer object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Integer object. Can be null.
-
getIntValue
Retrieves an out parameter as a int value.- Parameters:
name
- The out parameter name- Returns:
- The value as an int. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getIntValue
public int getIntValue(int pos) Retrieves an out parameter as a int value.- Parameters:
pos
- The out parameter index- Returns:
- The value as an int. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getLong
Retrieves an out parameter as a Long object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Long object. Can be null.
-
getLong
Retrieves an out parameter as a Long object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Long object. Can be null.
-
getLongValue
Retrieves an out parameter as a long value.- Parameters:
name
- The out parameter name- Returns:
- The value as an long. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getLongValue
public long getLongValue(int pos) Retrieves an out parameter as a long value.- Parameters:
pos
- The out parameter index- Returns:
- The value as an long. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getShort
Retrieves an out parameter as a Short object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Short object. Can be null.
-
getShort
Retrieves an out parameter as a Short object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Short object. Can be null.
-
getShortValue
Retrieves an out parameter as a short value.- Parameters:
name
- The out parameter name- Returns:
- The value as an short. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getShortValue
public short getShortValue(int pos) Retrieves an out parameter as a short value.- Parameters:
pos
- The out parameter index- Returns:
- The value as an short. Returns 0 if the value is absent.
- Since:
- 3.43.0
-
getDate
Retrieves an out parameter as aDate
object.- Parameters:
name
- The out parameter name- Returns:
- The value as a
Date
object. Can be null.
-
getDate
Retrieves an out parameter as aDate
object.- Parameters:
pos
- The out parameter index- Returns:
- The value as a
Date
object. Can be null.
-
getTimestamp
Retrieves an out parameter as aTimestamp
object.- Parameters:
name
- The out parameter name- Returns:
- The value as a
Timestamp
object. Can be null.
-
getTimestamp
Retrieves an out parameter as aTimestamp
object.- Parameters:
pos
- The out parameter index- Returns:
- The value as a
Timestamp
object. Can be null.
-
getDouble
Retrieves an out parameter as a Double object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Double object. Can be null.
-
getDouble
Retrieves an out parameter as a Double object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Double object. Can be null.
-
getDoubleValue
Retrieves an out parameter as a double value.- Parameters:
name
- The out parameter name- Returns:
- The value as an double. Returns 0.0d if the value is absent.
- Since:
- 3.43.0
-
getDoubleValue
public double getDoubleValue(int pos) Retrieves an out parameter as a double value.- Parameters:
pos
- The out parameter index- Returns:
- The value as an double. Returns 0.0d if the value is absent.
- Since:
- 3.43.0
-
getFloat
Retrieves an out parameter as a Float object.- Parameters:
name
- The out parameter name- Returns:
- The value as an Float object. Can be null.
-
getFloat
Retrieves an out parameter as a Float object.- Parameters:
pos
- The out parameter index- Returns:
- The value as an Float object. Can be null.
-
getFloatValue
Retrieves an out parameter as a float value.- Parameters:
name
- The out parameter name- Returns:
- The value as an float. Returns 0.0f if the value is absent.
- Since:
- 3.43.0
-
getFloatValue
public float getFloatValue(int pos) Retrieves an out parameter as a float value.- Parameters:
pos
- The out parameter index- Returns:
- The value as an float. Returns 0.0f if the value is absent.
- Since:
- 3.43.0
-
getRowSet
Retrieves aResultBearing
for an out parameter. This usually requires that the out parameter is a cursor type.- Parameters:
name
- The out parameter name- Returns:
- A
ResultBearing
object representing the out parameter and backed by the cursor. This is not supported by all database drivers. Never null but may be empty.
-
getRowSet
Retrieves aResultBearing
for an out parameter. This usually requires that the out parameter is a cursor type.- Parameters:
pos
- The out parameter index- Returns:
- A
ResultBearing
object representing the out parameter and backed by the cursor. This is not supported by all database drivers. Never null but may be empty.
-