Java connection to common database components and some common help classes

Source: Internet
Author: User

Every time you do something, whether it is development or testing, you have to write the classes and methods that connect to the database. In fact, there is no big difference, in addition, the interface functions provided by the existing JDBC are still very limited. of course, if you use something like hibernate for development, these things can be left empty. even if you use DAO to connect to a database with a ready-made item, it is faster than you copy it.

So I wrote a general database connection package, which has three classes:

1. dbconn. Java: Mainly used to connect to and close the database. The URL to connect to the database. The user and password are used to complete COM/bcxy/util/systemconfig. properties through the configuration file.

2. sqlquery. Java: the SQL statement used to execute the query. constructor: sqlquery (connection con, string SQL); Save the result in the container.

3. sqlupdate. Java: Mainly used to execute the updated SQL statement. constructor: sqlupdate (connection con, string SQL );

In addition:

The jar package contains an util. *, which is mainly a common tool class. The following is a brief introduction:
It mainly includes

Stringutil. Java: some operations on strings

Dateutil. Java: operations on time

Fileutil. Java: operations on files

Systemconfig. Java: Read the configuration file systemconfig. properties.

Paramutil. Java: Page parameter passing operation

API documentation: http://www.bcxy.com/tools/bcxydoc/
Jar package and source file: http://www.bcxy.com/tools/bcxy.rar

The above is a summary of my work and will be improved all the time. I hope you will give more comments.
We also hope to provide you with some convenience.

If you have any questions, you can contact: webmaster@bcxy.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.