类的使用
org.springframework.jdbc.core.JdbcTemplate
使用JdbcTemplate的程序包 程序包 说明 org.springframework.jdbc.core.namedparam JdbcTemplate variant with named parameter support.org.springframework.jdbc.core.simple Simplification layer for table inserts and stored procedure calls.org.springframework.jdbc.core.support Classes supporting theorg.springframework.jdbc.core
package.org.springframework.jdbc.object The classes in this package represent RDBMS queries, updates, and stored procedures as threadsafe, reusable objects.org.springframework.test.context.junit4 Support classes for integrating the Spring TestContext Framework with JUnit 4.12 or higher.org.springframework.test.context.testng Support classes for integrating the Spring TestContext Framework with TestNG.org.springframework.test.jdbc Support classes for tests based on JDBC.org.springframework.jdbc.core.namedparam中JdbcTemplate的使用
返回JdbcTemplate的org.springframework.jdbc.core.namedparam中的方法 修饰符和类型 方法 说明 JdbcTemplate
NamedParameterJdbcTemplate. getJdbcTemplate()
Expose the classic SpringJdbcTemplate
itself, if available, in particular for passing it on to otherJdbcTemplate
consumers.org.springframework.jdbc.core.simple中JdbcTemplate的使用
返回JdbcTemplate的org.springframework.jdbc.core.simple中的方法 修饰符和类型 方法 说明 JdbcTemplate
AbstractJdbcCall. getJdbcTemplate()
Get the configuredJdbcTemplate
.JdbcTemplate
AbstractJdbcInsert. getJdbcTemplate()
Get the configuredJdbcTemplate
.参数类型为JdbcTemplate的org.springframework.jdbc.core.simple中的构造器 构造器 说明 AbstractJdbcCall(JdbcTemplate jdbcTemplate)
Constructor to be used when initializing using aJdbcTemplate
.AbstractJdbcInsert(JdbcTemplate jdbcTemplate)
Constructor to be used when initializing using aJdbcTemplate
.SimpleJdbcCall(JdbcTemplate jdbcTemplate)
Alternative Constructor that takes one parameter with the JdbcTemplate to be used.SimpleJdbcInsert(JdbcTemplate jdbcTemplate)
Alternative Constructor that takes one parameter with the JdbcTemplate to be used.org.springframework.jdbc.core.support中JdbcTemplate的使用
返回JdbcTemplate的org.springframework.jdbc.core.support中的方法 修饰符和类型 方法 说明 protected JdbcTemplate
JdbcDaoSupport. createJdbcTemplate(DataSource dataSource)
Create a JdbcTemplate for the given DataSource.JdbcTemplate
JdbcDaoSupport. getJdbcTemplate()
Return the JdbcTemplate for this DAO, pre-initialized with the DataSource or set explicitly.参数类型为JdbcTemplate的org.springframework.jdbc.core.support中的方法 修饰符和类型 方法 说明 void
JdbcBeanDefinitionReader. setJdbcTemplate(JdbcTemplate jdbcTemplate)
Set the JdbcTemplate to be used by this bean factory.void
JdbcDaoSupport. setJdbcTemplate(JdbcTemplate jdbcTemplate)
Set the JdbcTemplate for this DAO explicitly, as an alternative to specifying a DataSource.org.springframework.jdbc.object中JdbcTemplate的使用
返回JdbcTemplate的org.springframework.jdbc.object中的方法 修饰符和类型 方法 说明 JdbcTemplate
RdbmsOperation. getJdbcTemplate()
Return theJdbcTemplate
used by this operation object.参数类型为JdbcTemplate的org.springframework.jdbc.object中的方法 修饰符和类型 方法 说明 void
RdbmsOperation. setJdbcTemplate(JdbcTemplate jdbcTemplate)
An alternative to the more commonly usedRdbmsOperation.setDataSource(javax.sql.DataSource)
when you want to use the sameJdbcTemplate
in multipleRdbmsOperations
.参数类型为JdbcTemplate的org.springframework.jdbc.object中的构造器 构造器 说明 StoredProcedure(JdbcTemplate jdbcTemplate, String name)
Create a new object wrapper for a stored procedure.org.springframework.test.context.junit4中JdbcTemplate的使用
声明为JdbcTemplate的org.springframework.test.context.junit4中的字段 修饰符和类型 字段 说明 protected JdbcTemplate
AbstractTransactionalJUnit4SpringContextTests. jdbcTemplate
TheJdbcTemplate
that this base class manages, available to subclasses.org.springframework.test.context.testng中JdbcTemplate的使用
声明为JdbcTemplate的org.springframework.test.context.testng中的字段 修饰符和类型 字段 说明 protected JdbcTemplate
AbstractTransactionalTestNGSpringContextTests. jdbcTemplate
TheJdbcTemplate
that this base class manages, available to subclasses.org.springframework.test.jdbc中JdbcTemplate的使用
参数类型为JdbcTemplate的org.springframework.test.jdbc中的方法 修饰符和类型 方法 说明 static int
JdbcTestUtils. countRowsInTable(JdbcTemplate jdbcTemplate, String tableName)
Count the rows in the given table.static int
JdbcTestUtils. countRowsInTableWhere(JdbcTemplate jdbcTemplate, String tableName, String whereClause)
Count the rows in the given table, using the providedWHERE
clause.static int
JdbcTestUtils. deleteFromTables(JdbcTemplate jdbcTemplate, String... tableNames)
Delete all rows from the specified tables.static int
JdbcTestUtils. deleteFromTableWhere(JdbcTemplate jdbcTemplate, String tableName, String whereClause, Object... args)
Delete rows from the given table, using the providedWHERE
clause.static void
JdbcTestUtils. dropTables(JdbcTemplate jdbcTemplate, String... tableNames)
Drop the specified tables.