文件名称:2_dbcomponent
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.13mb
- 下载次数:
- 0次
- 提 供 者:
- 姜**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
说明:
此组件为操作数据库的组件,实现了jdbc的功能,还包含了一些分页功能,实现事务的功能等。
组件中有一些静态的方法,在这些方法中包含了开关数据库的操作,所以用户不需要实例化对象就可以用类名调用这个方法,同时实现对数据库的操作。
组件中非静态的方法则需要实例化对象才可以调用,在实例化过程中会调用构造方法,开启数据库,在最后还要调用关闭数据库的方法。
在测试例子中用了一个main()方法,用户只需将环境配好,运行一下main方法就可以看到结果。
环境搭建:
1.首先建一个web工程。
2.在工程src下面新建两个包smart.css.database和smart.css.util。
3.将Source下的DBHandle.java考到smart.css.database,DateUtils考到smart.css.util下。
4.将Sample下的文件也考到smart.css.database包下。
5.将Enviroument下的jar文件考到WebRoot下的WEB-INF下面。
-Descr iption:
This component for operating the database components, to achieve the jdbc function, but also contains a number of paging capability to achieve affairs functions.
Component has some static methods, these methods include the switching operation of the database, so users do not need an instance of an object can use the class name to call this method, while achieving the operation of the database.
Component Central Africa static method you need to instantiate an object before they can call, in the instantiation process will call the constructor method, open the database, but also in the final call to close the database.
In the test case using a main () method, the user simply with a good environment, running about main ways you can see the result.
Environmental structures:
1. First, to build a web project.
2. In the new project src the following two packages smart.css.database and smart.css.util.
3. DBHandle.java the Source under test to smart.css.database, D
此组件为操作数据库的组件,实现了jdbc的功能,还包含了一些分页功能,实现事务的功能等。
组件中有一些静态的方法,在这些方法中包含了开关数据库的操作,所以用户不需要实例化对象就可以用类名调用这个方法,同时实现对数据库的操作。
组件中非静态的方法则需要实例化对象才可以调用,在实例化过程中会调用构造方法,开启数据库,在最后还要调用关闭数据库的方法。
在测试例子中用了一个main()方法,用户只需将环境配好,运行一下main方法就可以看到结果。
环境搭建:
1.首先建一个web工程。
2.在工程src下面新建两个包smart.css.database和smart.css.util。
3.将Source下的DBHandle.java考到smart.css.database,DateUtils考到smart.css.util下。
4.将Sample下的文件也考到smart.css.database包下。
5.将Enviroument下的jar文件考到WebRoot下的WEB-INF下面。
-Descr iption:
This component for operating the database components, to achieve the jdbc function, but also contains a number of paging capability to achieve affairs functions.
Component has some static methods, these methods include the switching operation of the database, so users do not need an instance of an object can use the class name to call this method, while achieving the operation of the database.
Component Central Africa static method you need to instantiate an object before they can call, in the instantiation process will call the constructor method, open the database, but also in the final call to close the database.
In the test case using a main () method, the user simply with a good environment, running about main ways you can see the result.
Environmental structures:
1. First, to build a web project.
2. In the new project src the following two packages smart.css.database and smart.css.util.
3. DBHandle.java the Source under test to smart.css.database, D
(系统自动生成,下载前可以参看下载内容)
下载文件列表
2_数据库组件\Class\smart\css\database\DBHandle.class
............\.....\.....\...\........\DBHandleTest.class
............\.....\.....\...\util\DateUtils.class
............\.....\.....\jrsoft\util\DateUtils.class
............\Document\DBHandle.doc
............\........\~$Connection.doc
............\........\~WRL3640.tmp
............\Enviroument\ojdbc14.jar
............\readme.txt
............\Sample\DBHandleTest.java
............\.ource\DateUtils.java
............\......\DBHandle.java
............\Class\smart\css\database
............\.....\.....\...\util
............\.....\.....\jrsoft\util
............\.....\.....\css
............\.....\.....\jrsoft
............\.....\smart
............\Class
............\Document
............\Enviroument
............\Sample
............\Source
2_数据库组件
............\.....\.....\...\........\DBHandleTest.class
............\.....\.....\...\util\DateUtils.class
............\.....\.....\jrsoft\util\DateUtils.class
............\Document\DBHandle.doc
............\........\~$Connection.doc
............\........\~WRL3640.tmp
............\Enviroument\ojdbc14.jar
............\readme.txt
............\Sample\DBHandleTest.java
............\.ource\DateUtils.java
............\......\DBHandle.java
............\Class\smart\css\database
............\.....\.....\...\util
............\.....\.....\jrsoft\util
............\.....\.....\css
............\.....\.....\jrsoft
............\.....\smart
............\Class
............\Document
............\Enviroument
............\Sample
............\Source
2_数据库组件