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 ParameterCreate a new emptyParameterfortype.booleanstatic ParameterCreate a newParameterfromvalue.static ParameterfromOrEmpty(Object value, Class<?> type) Class<?>getType()Return the column value type.getValue()Return the column value (can benull).inthashCode()booleanhasValue()Return whether thisParameterhas a value.booleanisEmpty()Return whether thisParameterhas a empty.toString()
-
Method Details
-
from
Create a newParameterfromvalue.- Parameters:
value- the parameter value- Returns:
- the
Parametervalue forvalue
-
fromOrEmpty
- Parameters:
value- the parameter value (can benull)type- the parameter type- Returns:
- the
Parametervalue forvalue
-
empty
Create a new emptyParameterfortype.- Returns:
- the empty
Parametervalue fortype
-
getValue
Return the column value (can benull).- See Also:
-
getType
Return the column value type. Must be also present if thevalueisnull. -
hasValue
public boolean hasValue()Return whether thisParameterhas a value.- Returns:
falseifgetValue()isnull
-
isEmpty
public boolean isEmpty()Return whether thisParameterhas a empty.- Returns:
trueifgetValue()isnull
-
equals
-
hashCode
public int hashCode() -
toString
-