290 APPENDIX B n HIBERNATE TOOLS APPENDIX B (Photoshop web design)

290 APPENDIX B n HIBERNATE TOOLS APPENDIX B n HIBERNATE TOOLS This exporter can be used to permit the mapping file based creation of suitable classes, or to create classes from the database schema when is used. The element generates the XML mapping files from the information con tained in the metamodel. Table B-6 shows the attributes that can be supplied. Table B-6. The Attributes Available to the Element Property Default Description destdir If set, overrides, for this exporter only, the destination directory specified on the tools task This exporter is particularly terse because it only writes out the mapping information stored in the metamodel. This is all handled by the appropriate configuration element. The exporter just needs to know which path to write the XML files into. And that can be specified at the Hibernate tool level. A fairly typical invocation of this exporter is, in its entirety, the ridiculously simple . The element generates HTML documentation of the schema and entities in a style similar to the familiar javadoc output. Table B-7 shows the attributes that can be supplied. Table B-7. The Attributes Available to the Exporter Element Property Default Description destdir If set, overrides, for this exporter only, the destination directory specified on the tools task The element generates a set of basic DAO classes one for each of the entities in the metadata. Table B-8 shows the attributes that can be supplied. Table B-8. The Attributes Available to the Exporter Element Property Default Description destdir If set, overrides, for this exporter only, the destination directory specified on the tools task By default, these DAO classes will be named after your entity, suffixed with Home. The generated DAOs provide a set of methods roughly corresponding to the methods available on the Session interface, but strongly tied to the entity type. While the generated DAOs can provide a useful foundation for your own more specific DAOs, we generally find that they offer little value beyond that already offered from the standard Session interactions. nNote Nothing in any of the exporters intrinsically stops you from generating silly combinations of output but this has its advantages; for example, it is possible to use an configuration element with the exporter to generate POJOs. While that might seem pointless, given that you have to start with POJOs to use an annotations-based configuration in the first place, it actually provides the useful ability to generate Java 1.4 compatible source code from annotated Java 5 class files!
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply