JavaBean and Model combined


JFinal 2.1 version provides ModelGenerator, BaseModelGenerator, MappingKitGernator, and DataDictionaryGenerator, which generate four types of files: Model, BaseModel, MappingKit, and DataDictionary respectively. These four types of files can be automatically generated based on the data table.


Compared with versions before JFinal 2.1, the generated Model inherits from BaseModel rather than from Model. BaseModel has getter and setter methods that comply with traditional java bean specifications. Model Inheriting from BaseModel completes the integration of JavaBean and Model. It has all the advantages of traditional JavaBean, and all getter and setter methods do not require manual intervention. If there are any changes in the data table, it can be regenerated with one click.


For specific usage, you can download the relevant GeneratorDemo from the jfinal official website. The usage is extremely simple.