|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.hasor.jdbc.core.source.AbstractSqlParameterSource
net.hasor.jdbc.core.source.MapSqlParameterSource
public class MapSqlParameterSource
SqlParameterSource implementation that holds a given Map of parameters.
This class is intended for passing in a simple Map of parameter values
to the methods of the NamedJdbcTemplate class.
The addValue methods on this class will make adding several
values easier. The methods return a reference to the MapSqlParameterSource
itself, so you can chain several method calls together within a single statement.
addValue(String, Object),
addValue(String, Object, int),
AbstractSqlParameterSource.registerSqlType(java.lang.String, int),
NamedJdbcTemplate| 字段摘要 |
|---|
| 从接口 net.hasor.jdbc.SqlParameterSource 继承的字段 |
|---|
TYPE_UNKNOWN |
| 构造方法摘要 | |
|---|---|
MapSqlParameterSource()
Create an empty MapSqlParameterSource, with values to be added via addValue. |
|
MapSqlParameterSource(Map<String,?> values)
Create a new MapSqlParameterSource based on a Map. |
|
MapSqlParameterSource(String paramName,
Object value)
Create a new MapSqlParameterSource, with one value comprised of the supplied arguments. |
|
| 方法摘要 | |
|---|---|
MapSqlParameterSource |
addValue(String paramName,
Object value)
Add a parameter to this parameter source. |
MapSqlParameterSource |
addValue(String paramName,
Object value,
int sqlType)
Add a parameter to this parameter source. |
MapSqlParameterSource |
addValue(String paramName,
Object value,
int sqlType,
String typeName)
Add a parameter to this parameter source. |
MapSqlParameterSource |
addValues(Map<String,?> values)
Add a Map of parameters to this parameter source. |
Object |
getValue(String paramName)
Return the parameter value for the requested named parameter. |
Map<String,Object> |
getValues()
Expose the current parameter values as read-only Map. |
boolean |
hasValue(String paramName)
Determine whether there is a value for the specified named parameter. |
| 从类 net.hasor.jdbc.core.source.AbstractSqlParameterSource 继承的方法 |
|---|
getSqlType, getTypeName, registerSqlType, registerTypeName |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public MapSqlParameterSource()
addValue.
addValue(String, Object)
public MapSqlParameterSource(String paramName,
Object value)
paramName - the name of the parametervalue - the value of the parameteraddValue(String, Object)public MapSqlParameterSource(Map<String,?> values)
values - a Map holding existing parameter values (can be null)| 方法详细信息 |
|---|
public MapSqlParameterSource addValue(String paramName,
Object value)
paramName - the name of the parametervalue - the value of the parameter
public MapSqlParameterSource addValue(String paramName,
Object value,
int sqlType)
paramName - the name of the parametervalue - the value of the parametersqlType - the SQL type of the parameter
public MapSqlParameterSource addValue(String paramName,
Object value,
int sqlType,
String typeName)
paramName - the name of the parametervalue - the value of the parametersqlType - the SQL type of the parametertypeName - the type name of the parameter
public MapSqlParameterSource addValues(Map<String,?> values)
values - a Map holding existing parameter values (can be null)
public Map<String,Object> getValues()
public boolean hasValue(String paramName)
SqlParameterSource 复制的描述
paramName - the name of the parameter
public Object getValue(String paramName)
SqlParameterSource 复制的描述
paramName - the name of the parameter
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||