Package org.springframework.r2dbc.core
Class Parameter
java.lang.Object
org.springframework.r2dbc.core.Parameter
A database value that can be set in a statement.
- Since:
- 5.3
- Author:
- Mark Paluch, Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionstatic Parameter
Create a new emptyParameter
fortype
.boolean
static Parameter
Create a newParameter
fromvalue
.static Parameter
fromOrEmpty
(Object value, Class<?> type) Class<?>
getType()
Return the column value type.getValue()
Return the column value (can benull
).int
hashCode()
boolean
hasValue()
Return whether thisParameter
has a value.boolean
isEmpty()
Return whether thisParameter
has a empty.toString()
-
Method Details
-
from
Create a newParameter
fromvalue
.- Parameters:
value
- the parameter value- Returns:
- the
Parameter
value forvalue
-
fromOrEmpty
- Parameters:
value
- the parameter value (can benull
)type
- the parameter type- Returns:
- the
Parameter
value forvalue
-
empty
Create a new emptyParameter
fortype
.- Returns:
- the empty
Parameter
value fortype
-
getValue
Return the column value (can benull
).- See Also:
-
getType
Return the column value type. Must be also present if thevalue
isnull
. -
hasValue
public boolean hasValue()Return whether thisParameter
has a value.- Returns:
false
ifgetValue()
isnull
-
isEmpty
public boolean isEmpty()Return whether thisParameter
has a empty.- Returns:
true
ifgetValue()
isnull
-
equals
-
hashCode
public int hashCode() -
toString
-