Hi,
We believe that hbm.xml files have a complete definition that contains all information which an application might need for accessing an object and find it in the database.
We think about a code-generation tool which simplifies searching for objects.
This tool generates some jsps and servlets from mapping files. When running these jsps, an html search form is displayed to the user, with all fields of the object.
For example, if there is an ‘Address’ object in the 'address.hbm.xml', the tool will generate an html form which has text boxes for ‘address line’, ‘zipcode’, ‘street name’ …. and a “search” button. User fills some textboxes and click on search button, a code-generated search result page is displayed to user.
This code generation tool can be more intelligent:
1)If an Address has a relation to city, the jsp form can show a list box of cities instead of a simple textbox.
2)The hbm.xml files can be marked to define, the fields that should be displayed in search form.
3) What do you think!
Is this tool available by now?
Do you think this tool can be developed and be useful?
I found that org.hibernate.metadata.ClassMetaData” can do a lot in this tool, do you think other hibernate classes can be used in this tool?
Regards,
Alireza Fattahi
|