Organizing Dao data

Source: Internet
Author: User

In the past two days, due to the use of DAO technology, I learned and studied it. Updating...

Let's talk about the environment first.

Ecplise3.2, jdk1.5, hibernate3.0

Dao is automatically generated. (select a table in dB Brower to generate a hibernate table ing. Select the DaO column)

Then we can see that each table in the created package has three files (such as user, permission, and user permission relation table)

Example of a user: User. Java abstractuser. Java userdao. Java

A typical Dao composition: Dao factory class, Dao interface, specific class implementing Dao interface (each DAO instance is responsible for a main domain object or entity), VO (value object ).

If only one Dao factory is considered as a database implementation, the factory design mode is used when many Dao are created.

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.