TestRule声明工厂方法
TestRule是一个工厂方法模式中的Creator角色——声明工厂方法。
package org.junit.rules;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
public interface TestRule {
Statement ...
分类:
其他好文 时间:
2014-10-20 21:23:11
阅读次数:
289
简介:JDBC 中的语句处理在 JDBC 应用程序中,JDBC 语句对象用于将 SQL 语句发送到数据库服务器。一个语句对象与一个连接相关联,应用程序与数据库服务器之间的通信由语句对象来处理。JDBC 中有三种类型的语句对象:常规语句(General statement)预置语句(Prepared ...
分类:
其他好文 时间:
2014-10-20 21:00:10
阅读次数:
320
转:http://blog.csdn.net/colin_fantasy/article/details/3898070execute、executeQuery和executeUpdate之间的区别JDBC中Statement 接口提供了三种执行 SQL 语句的方法:executeQuery、exe...
分类:
其他好文 时间:
2014-10-20 19:06:47
阅读次数:
235
一、什么是PreparedStatement 参阅Java API文档,我们可以知道,PreparedStatement是Statement的子接口(如图所示),表示预编译的 SQL 语句的对象,SQL 语句被预编译并存储在PreparedStatement对象中。然后可以使用此对象多次高效...
分类:
数据库 时间:
2014-10-20 11:40:15
阅读次数:
265
笔试前参考往年题目。有道智力题,分金条,网上搜这个关键字就有解。1. java链接数据库的步骤, preparedstatment 和statement有什么区别2. session和cookie的区别,怎么用session和cookie来访问共享用户信息 答:参考cookie 和session 的...
分类:
其他好文 时间:
2014-10-20 11:18:05
阅读次数:
218
如果要评选JUnit中最最重要的类型,或者说核心,无疑是org.junit.runners.model.Statement。...
分类:
其他好文 时间:
2014-10-20 03:24:34
阅读次数:
171
在实际的项目开发中,有时候需要向数据库发送一批SQL语句执行,这时应避免向数据库一条条的发送执行,而应采用JDBC的批处理机制,以提升执行效率。 JDBC实现批处理有两种方式:statement和preparedstatement一、使用Statement完成批处理 1、使用Statemen...
分类:
数据库 时间:
2014-10-18 12:35:12
阅读次数:
171
抽象类Statement作为命令模式的Command,只有一个方法public abstractvoid
evaluate() throws Throwable;
作为命令模式的Invoker的各种Runner,将发出各种Statement并以它们表示运行JUnit测试组的整个过程。针对方法的标注如@Test 、@Before、@After、@BeforeClass、@AfterClass和各...
分类:
其他好文 时间:
2014-10-18 11:12:39
阅读次数:
251
The parallelogram law in inner product spacesVectors involved in the parallelogram law.In a normed space, the statement of the parallelogram law is an...
分类:
其他好文 时间:
2014-10-18 11:03:28
阅读次数:
221
JDBC工具类
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class JDBCUtil {
public static final ...
分类:
数据库 时间:
2014-10-17 15:37:46
阅读次数:
209