286 APPENDIX B n HIBERNATE TOOLS APPENDIX B (Affordable web design)
286 APPENDIX B n HIBERNATE TOOLS APPENDIX B n HIBERNATE TOOLS Table B-1. The Daughter Elements of the Hibernate Tools Task Attribute Description classpath The path to use when locating libraries and configuration files. destDir The base directory (relative to the build script s own base directory) into which any generated output will be written. templatePath The path containing user-created template files (see the further discussion of templates in the Templates section later in the chapter.) Within the declared Hibernate task, a number of additional standard elements can be created, consisting of a classpath declaration (an alternative to using the classpath attribute), a set of configuration elements, and a set of exporter elements. The classpath element and attribute are standard Ant features that allow you to bring in any necessary resources used by the Hibernate tasks. The clever bit of the Hibernate Ant task lies in the configuration elements. Declaring a configuration task causes an appropriate configuration object to be built in memory. These in-memory configuration objects all extend the standard org.hibernate.cfg.Configuration class. The Configuration class represents the mapping relationships between entities (combined with information from any configuration, properties, or reverse engineering files), and it is this information, the metamodel, that is then used to generate the various output files. The provided configuration elements can conjure up a Configuration object from the standard mapping files, from the metadata information gathered over a JDBC connection, and from the annotations discussed in Chapter 6.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.