Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
d3c0dd1c
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,发现更多精彩内容 >>
提交
d3c0dd1c
编写于
3月 01, 2013
作者:
J
Juergen Hoeller
提交者:
unknown
3月 01, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor javadoc updates
上级
99c7f25b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
20 deletion
+21
-20
spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java
...support/AbstractLobCreatingPreparedStatementCallback.java
+5
-3
spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
.../springframework/jdbc/support/lob/AbstractLobHandler.java
+2
-2
spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
.../jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
+2
-2
spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
...jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
+12
-13
未找到文件。
spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java
浏览文件 @
d3c0dd1c
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
3
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -23,15 +23,16 @@ import org.springframework.dao.DataAccessException;
import
org.springframework.jdbc.core.PreparedStatementCallback
;
import
org.springframework.jdbc.support.lob.LobCreator
;
import
org.springframework.jdbc.support.lob.LobHandler
;
import
org.springframework.util.Assert
;
/**
* Abstract
PreparedStatementCallback implementation that manages a LobCreator
.
* Abstract
{@link PreparedStatementCallback} implementation that manages a {@link LobCreator}
.
* Typically used as inner class, with access to surrounding method arguments.
*
* <p>Delegates to the {@code setValues} template method for setting values
* on the PreparedStatement, using a given LobCreator for BLOB/CLOB arguments.
*
* <p>A usage example with
JdbcTemplate
:
* <p>A usage example with
{@link org.springframework.jdbc.core.JdbcTemplate}
:
*
* <pre class="code">JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); // reusable object
* LobHandler lobHandler = new DefaultLobHandler(); // reusable object
...
...
@@ -62,6 +63,7 @@ public abstract class AbstractLobCreatingPreparedStatementCallback implements Pr
* @param lobHandler the LobHandler to create LobCreators with
*/
public
AbstractLobCreatingPreparedStatementCallback
(
LobHandler
lobHandler
)
{
Assert
.
notNull
(
lobHandler
,
"LobHandler must not be null"
);
this
.
lobHandler
=
lobHandler
;
}
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
浏览文件 @
d3c0dd1c
/*
* Copyright 2002-20
05
the original author or authors.
* Copyright 2002-20
13
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -22,7 +22,7 @@ import java.sql.ResultSet;
import
java.sql.SQLException
;
/**
* Abstract base class for
LobHandler
implementations.
* Abstract base class for
{@link LobHandler}
implementations.
*
* <p>Implements all accessor methods for column names through a column lookup
* and delegating to the corresponding accessor that takes a column index.
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
浏览文件 @
d3c0dd1c
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
3
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -24,7 +24,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Implementation of the {@link NativeJdbcExtractor} interface for WebLogic,
* supporting WebLogic Server
8.1
and higher.
* supporting WebLogic Server
9.0
and higher.
*
* <p>Returns the underlying native Connection to application code instead
* of WebLogic's wrapper implementation; unwraps the Connection for native
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
浏览文件 @
d3c0dd1c
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
3
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -24,7 +24,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Implementation of the {@link NativeJdbcExtractor} interface for WebSphere,
* supporting WebSphere Application Server
5
.1 and higher.
* supporting WebSphere Application Server
6
.1 and higher.
*
* <p>Returns the underlying native Connection to application code instead
* of WebSphere's wrapper implementation; unwraps the Connection for
...
...
@@ -40,14 +40,14 @@ import org.springframework.util.ReflectionUtils;
*/
public
class
WebSphereNativeJdbcExtractor
extends
NativeJdbcExtractorAdapter
{
private
static
final
String
JDBC_ADAPTER_CONNECTION_NAME
_5
=
"com.ibm.ws.rsadapter.jdbc.WSJdbcConnection"
;
private
static
final
String
JDBC_ADAPTER_CONNECTION_NAME
=
"com.ibm.ws.rsadapter.jdbc.WSJdbcConnection"
;
private
static
final
String
JDBC_ADAPTER_UTIL_NAME
_5
=
"com.ibm.ws.rsadapter.jdbc.WSJdbcUtil"
;
private
static
final
String
JDBC_ADAPTER_UTIL_NAME
=
"com.ibm.ws.rsadapter.jdbc.WSJdbcUtil"
;
private
Class
webSphere
5
ConnectionClass
;
private
Class
webSphereConnectionClass
;
private
Method
webSphere
5
NativeConnectionMethod
;
private
Method
webSphereNativeConnectionMethod
;
/**
...
...
@@ -56,10 +56,10 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
*/
public
WebSphereNativeJdbcExtractor
()
{
try
{
this
.
webSphere
5ConnectionClass
=
getClass
().
getClassLoader
().
loadClass
(
JDBC_ADAPTER_CONNECTION_NAME_5
);
Class
jdbcAdapterUtilClass
=
getClass
().
getClassLoader
().
loadClass
(
JDBC_ADAPTER_UTIL_NAME
_5
);
this
.
webSphere
5
NativeConnectionMethod
=
jdbcAdapterUtilClass
.
getMethod
(
"getNativeConnection"
,
new
Class
[]
{
this
.
webSphere
5
ConnectionClass
});
this
.
webSphere
ConnectionClass
=
getClass
().
getClassLoader
().
loadClass
(
JDBC_ADAPTER_CONNECTION_NAME
);
Class
jdbcAdapterUtilClass
=
getClass
().
getClassLoader
().
loadClass
(
JDBC_ADAPTER_UTIL_NAME
);
this
.
webSphereNativeConnectionMethod
=
jdbcAdapterUtilClass
.
getMethod
(
"getNativeConnection"
,
new
Class
[]
{
this
.
webSphereConnectionClass
});
}
catch
(
Exception
ex
)
{
throw
new
IllegalStateException
(
...
...
@@ -97,9 +97,8 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
*/
@Override
protected
Connection
doGetNativeConnection
(
Connection
con
)
throws
SQLException
{
if
(
this
.
webSphere5ConnectionClass
.
isAssignableFrom
(
con
.
getClass
()))
{
return
(
Connection
)
ReflectionUtils
.
invokeJdbcMethod
(
this
.
webSphere5NativeConnectionMethod
,
null
,
new
Object
[]
{
con
});
if
(
this
.
webSphereConnectionClass
.
isAssignableFrom
(
con
.
getClass
()))
{
return
(
Connection
)
ReflectionUtils
.
invokeJdbcMethod
(
this
.
webSphereNativeConnectionMethod
,
null
,
con
);
}
return
con
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录