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