Hibernate map File Generator upgrade by LDDXFS

Source: Internet
Author: User

Project

Description of the various functions

Xmlutils loads an XML template, using XStream to map XML elements to Java objects.

Propertyutils loads the properties file and replaces the defined variables in properties and XML.

ClassInfo store Java Common class type information, such as String.class, etc.

Domainclassinfo stores information for the PO type and needs to be initialized by passing in a package string. For example, incoming cn.lddxfs.hibernate.test

Hbmtemplate_***.xml hbm.xml template file, you can separate multiple files to write, avoid a single file too large.

Var.properties A variable that consists of a predefined variable, a string, and a pre-defined variable.

Generateutils obtains information about the relationship between the PO and provides a way to generate the PO.hbm.xml mapping file.

Executegenerate initializes domainclassinfo, calls Generateutils to generate multiple build PO.hbm.xml mapping files.

Types supported at this stage (only supported under single package (not supporting sub-packages, if the Hbmtemplate_***.xml template file needs to be modified in different sub-packages))

1 basic properties, such as date, binary, base type, basic type wrapper class, String

2 value type collection map set List Array map Collection

3 Unidirectional one-way, bi-directional one-to-two (using a pair of foreign keys)

4 bidirectional/Canchondo to a Set List Array Collection

5 bidirectional/Canchondo to Multi

6 inheritance structure mappings are not supported (inheritance structures are less commonly used,)

About XML templates

Based on variable substitution, string concatenation

Hibernate map File Generator upgrade by LDDXFS

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.