public class EmptySqlParameterSource extends Object implements SqlParameterSource
SqlParameterSource
interface.Modifier and Type | Field and Description |
---|---|
static EmptySqlParameterSource |
INSTANCE
A shared instance of
EmptySqlParameterSource . |
TYPE_UNKNOWN
Constructor and Description |
---|
EmptySqlParameterSource() |
Modifier and Type | Method and Description |
---|---|
String[] |
getParameterNames()
Enumerate all available parameter names if possible.
|
int |
getSqlType(String paramName)
Determine the SQL type for the specified named parameter.
|
String |
getTypeName(String paramName)
Determine the type name for the specified named parameter.
|
Object |
getValue(String paramName)
Return the parameter value for the requested named parameter.
|
boolean |
hasValue(String paramName)
Determine whether there is a value for the specified named parameter.
|
public static final EmptySqlParameterSource INSTANCE
EmptySqlParameterSource
.public boolean hasValue(String paramName)
SqlParameterSource
hasValue
in interface SqlParameterSource
paramName
- the name of the parameter@Nullable public Object getValue(String paramName) throws IllegalArgumentException
SqlParameterSource
getValue
in interface SqlParameterSource
paramName
- the name of the parameterIllegalArgumentException
- if there is no value for the requested parameterpublic int getSqlType(String paramName)
SqlParameterSource
getSqlType
in interface SqlParameterSource
paramName
- the name of the parameterTYPE_UNKNOWN
if not knownSqlParameterSource.TYPE_UNKNOWN
@Nullable public String getTypeName(String paramName)
SqlParameterSource
getTypeName
in interface SqlParameterSource
paramName
- the name of the parameternull
if not known@Nullable public String[] getParameterNames()
SqlParameterSource
This is an optional operation, primarily for use with
SimpleJdbcInsert
and SimpleJdbcCall
.
getParameterNames
in interface SqlParameterSource
null
if not determinableSqlParameterSourceUtils.extractCaseInsensitiveParameterNames(org.springframework.jdbc.core.namedparam.SqlParameterSource)