Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
a6f3f101
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a6f3f101
编写于
6月 24, 2014
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Preparations for eventual removal of ParameterizedRowMapper along with SimpleJdbcTemplate
Issue: SPR-11895
上级
13c4a039
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
30 addition
and
7 deletion
+30
-7
spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java
.../org/springframework/jdbc/core/BeanPropertyRowMapper.java
+2
-2
spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java
.../org/springframework/jdbc/core/SingleColumnRowMapper.java
+14
-1
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
.../jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
+5
-1
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedRowMapper.java
...ingframework/jdbc/core/simple/ParameterizedRowMapper.java
+3
-0
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
.../jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
+6
-3
未找到文件。
spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java
浏览文件 @
a6f3f101
/*
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
4
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -63,7 +63,7 @@ import org.springframework.util.StringUtils;
...
@@ -63,7 +63,7 @@ import org.springframework.util.StringUtils;
* will have been set to the primitive's default value instead of null.
* will have been set to the primitive's default value instead of null.
*
*
* <p>Please note that this class is designed to provide convenience rather than high performance.
* <p>Please note that this class is designed to provide convenience rather than high performance.
* For best performance
consider using a custom RowMapper
.
* For best performance
, consider using a custom {@link RowMapper} implementation
.
*
*
* @author Thomas Risberg
* @author Thomas Risberg
* @author Juergen Hoeller
* @author Juergen Hoeller
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java
浏览文件 @
a6f3f101
/*
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
4
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -185,4 +185,17 @@ public class SingleColumnRowMapper<T> implements RowMapper<T> {
...
@@ -185,4 +185,17 @@ public class SingleColumnRowMapper<T> implements RowMapper<T> {
}
}
}
}
/**
* Static factory method to create a new ParameterizedSingleColumnRowMapper
* (with the required type specified only once).
* @param requiredType the type that each result object is expected to match
* @since 4.1
*/
public
static
<
T
>
SingleColumnRowMapper
<
T
>
newInstance
(
Class
<
T
>
requiredType
)
{
SingleColumnRowMapper
<
T
>
newInstance
=
new
SingleColumnRowMapper
<
T
>();
newInstance
.
setRequiredType
(
requiredType
);
return
newInstance
;
}
}
}
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
浏览文件 @
a6f3f101
...
@@ -43,13 +43,17 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
...
@@ -43,13 +43,17 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
* try using column aliases in the SQL statement like "select fname as first_name from customer".
* try using column aliases in the SQL statement like "select fname as first_name from customer".
*
*
* <p>Please note that this class is designed to provide convenience rather than high performance.
* <p>Please note that this class is designed to provide convenience rather than high performance.
* For best performance consider using a custom RowMapper.
* For best performance, consider using a custom {@link org.springframework.jdbc.core.RowMapper}
* implementation.
*
*
* @author Thomas Risberg
* @author Thomas Risberg
* @author Juergen Hoeller
* @author Juergen Hoeller
* @since 2.5
* @since 2.5
* @see ParameterizedRowMapper
* @see ParameterizedRowMapper
* @deprecated along with {@link SimpleJdbcTemplate}, in favor of the regular
* {@link org.springframework.jdbc.core.BeanPropertyRowMapper}
*/
*/
@Deprecated
public
class
ParameterizedBeanPropertyRowMapper
<
T
>
extends
BeanPropertyRowMapper
<
T
>
public
class
ParameterizedBeanPropertyRowMapper
<
T
>
extends
BeanPropertyRowMapper
<
T
>
implements
ParameterizedRowMapper
<
T
>
{
implements
ParameterizedRowMapper
<
T
>
{
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedRowMapper.java
浏览文件 @
a6f3f101
...
@@ -27,7 +27,10 @@ import org.springframework.jdbc.core.RowMapper;
...
@@ -27,7 +27,10 @@ import org.springframework.jdbc.core.RowMapper;
* @author Juergen Hoeller
* @author Juergen Hoeller
* @since 2.0
* @since 2.0
* @see org.springframework.jdbc.core.simple.SimpleJdbcOperations
* @see org.springframework.jdbc.core.simple.SimpleJdbcOperations
* @deprecated along with {@link SimpleJdbcTemplate}, in favor of the regular
* {@link org.springframework.jdbc.core.SingleColumnRowMapper}
*/
*/
@Deprecated
public
interface
ParameterizedRowMapper
<
T
>
extends
RowMapper
<
T
>
{
public
interface
ParameterizedRowMapper
<
T
>
extends
RowMapper
<
T
>
{
}
}
spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
浏览文件 @
a6f3f101
...
@@ -32,7 +32,10 @@ import org.springframework.jdbc.core.SingleColumnRowMapper;
...
@@ -32,7 +32,10 @@ import org.springframework.jdbc.core.SingleColumnRowMapper;
*
*
* @author Juergen Hoeller
* @author Juergen Hoeller
* @since 2.5.2
* @since 2.5.2
* @deprecated along with {@link SimpleJdbcTemplate}, in favor of the regular
* {@link org.springframework.jdbc.core.SingleColumnRowMapper}
*/
*/
@Deprecated
public
class
ParameterizedSingleColumnRowMapper
<
T
>
extends
SingleColumnRowMapper
<
T
>
public
class
ParameterizedSingleColumnRowMapper
<
T
>
extends
SingleColumnRowMapper
<
T
>
implements
ParameterizedRowMapper
<
T
>
{
implements
ParameterizedRowMapper
<
T
>
{
...
@@ -42,9 +45,9 @@ public class ParameterizedSingleColumnRowMapper<T> extends SingleColumnRowMapper
...
@@ -42,9 +45,9 @@ public class ParameterizedSingleColumnRowMapper<T> extends SingleColumnRowMapper
* @param requiredType the type that each result object is expected to match
* @param requiredType the type that each result object is expected to match
*/
*/
public
static
<
T
>
ParameterizedSingleColumnRowMapper
<
T
>
newInstance
(
Class
<
T
>
requiredType
)
{
public
static
<
T
>
ParameterizedSingleColumnRowMapper
<
T
>
newInstance
(
Class
<
T
>
requiredType
)
{
ParameterizedSingleColumnRowMapper
<
T
>
rm
=
new
ParameterizedSingleColumnRowMapper
<
T
>();
ParameterizedSingleColumnRowMapper
<
T
>
newInstance
=
new
ParameterizedSingleColumnRowMapper
<
T
>();
rm
.
setRequiredType
(
requiredType
);
newInstance
.
setRequiredType
(
requiredType
);
return
rm
;
return
newInstance
;
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录