CHAPTER 2 Starting a project
org.hsqldb.jdbcDriver
jdbc:hsqldb:hsql://localhost
sa
org.hibernate.dialect.HSQLDialect The exporter writes all the database connection settings you used for reverse engineering into this file, assuming that this is the database you want to connect to when you run the application. It also adds all generated XML mapping files to the configuration. What is your next step? You can start writing the source code for the Message Java class. Or you can let the Hibernate Tools generate the classes of the domain model for you. 2.3.3 Generating Java source code Let s assume you have an existing Hibernate XML mapping file for the Message class, and you d like to generate the source for the class. As discussed in chapter 3, a plain Java entity class ideally implements Serializable, has a no-arguments constructor, has getters and setters for all properties, and has an encapsulated implementation. Source code for entity classes can be generated with the Hibernate Tools and the hbm2java exporter in your Ant build. The source artifact can be anything that can be read into a Hibernate metadata model Hibernate XML mapping files are best if you want to customize the Java code generation. Add the following target to your Ant build:
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.
This entry was posted
on Thursday, November 1st, 2007 at 10:24 pm and is filed under PHP5.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.