ns" a base class, which it rewrites at will as you change the mapping, and gives you a subclass that extends this base class, where you can put business logic and other code, without fear that it will ever get changed out from under you.
As befits an approach centered around the Hibernate mapping document, Hibernate Synchronizer includes a new editor component for Eclipse that provides intelligent assistance and code completion for such documents. A nice DTD-driven XML editor, such as the aforementioned XMLBuddy, can do some of this for you, but Hibernate Synchronizer uses its semantic understanding of the documents to go much further. It also offers a graphical view of the properties and relations in the mapping, "wizard" interfaces for creating new elements, and other such niceties. And, as mentioned, in its default configuration the editor automatically regenerates the data-access classes as you edit their mapping documents.
There are other pieces to Hibernate Synchronizer, too. It adds a section to Eclipse's New menu that provides wizards for creating Hibernate configuration and mapping files, and adds contextual menu entries in the package explorer and in other appropriate places, providing easy access to relevant Hibernate operations.
OK, enough abstract description, time to get down to the practical stuff! After all, you were already probably interested in this, or you wouldn't have started to read the article. So how do you get and play with Hibernate Synchronizer?
Hibernate Synchronizer is installed using Eclipse's built-in Update Manager. The plugin offers separate update sites for users of Eclipse 2.1 and the forthcoming Eclipse 3. Because I'm using Eclipse for mission-critical work, I'm still using the production release, 2.1. As I write this, Eclipse 3 has entered its "release candidate" phase, and I am very much looking forward to being able to upgrade to a production release of version 3 when I return from JavaOne later this summer. (The main reason I mention this is to emphasize that the following instructions are written from an Eclipse 2 perspective; some commands and screens are undoubtedly different in Eclipse 3, so if you're using it, be sure to apply your own judgment in following these steps! If it helps, my impression is that Hibernate Synchronizer's own insta
上一篇:
基于Android的海南风景猜猜看软件的开发与研究
下一篇:
试论APP广告在手机中的应用