|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SqlParameterSource
Interface that defines common functionality for objects that can
offer parameter values for named SQL parameters, serving as argument
for NamedParameterJdbcTemplate
operations.
This interface allows for the specification of SQL type in addition to parameter values. All parameter values and types are identified by specifying the name of the parameter.
Intended to wrap various implementations like a Map or a JavaBean with a consistent interface.
NamedParameterJdbcOperations
,
NamedParameterJdbcTemplate
,
MapSqlParameterSource
,
BeanPropertySqlParameterSource
Field Summary | |
---|---|
static int |
TYPE_UNKNOWN
Constant that indicates an unknown (or unspecified) SQL type. |
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final int TYPE_UNKNOWN
getType
when no specific SQL type known.
getSqlType(java.lang.String)
,
Types
,
Constant Field ValuesMethod Detail |
---|
boolean hasValue(String paramName)
paramName
- the name of the parameter
Object getValue(String paramName) throws IllegalArgumentException
paramName
- the name of the parameter
IllegalArgumentException
- if there is no value for the requested parameterint getSqlType(String paramName)
paramName
- the name of the parameter
TYPE_UNKNOWN
if not knownTYPE_UNKNOWN
String getTypeName(String paramName)
paramName
- the name of the parameter
null
if not known
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |