Principles of Hibernate Persistence class

Source: Internet
Author: User
Persistence java classes must follow the following principles: 1. this class usually requires an id. we recommend that you use encapsulation type 2. this class cannot be modified by final. you need to provide a non-parameter constructor for this class. 4. you need to provide the gettersetter method for all attributes. 5. if the operation involves the set data, the set type should use the interface type, List, Map

Persistence java classes must follow the following principles: 1. this class usually requires an id. we recommend that you use encapsulation type 2. this class cannot be modified by final. you need to provide a non-parameter constructor for this class. 4. you need to provide the getter/setter method for all attributes. 5. if the operation involves the set data, the set type should use the interface type, List, Map

Persistence java classes must follow the following principles:
1. This class usually requires an id. We recommend that you use the encapsulation type.
2. This class cannot be modified by final.
3. You need to provide a non-parameter constructor for this class.
4. The getter/setter method must be provided for all attributes.
5. If operations on the set data are involved, use the interface type, List, Map

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.