Hibernate Syncronizer now generates code for Hibernate 3.0

Discussion in 'Java' started by msenin@covad.net, Jul 14, 2005.

  1. Guest

    I am one of those enterprise Java developers who loves Hibernate
    Synchonizer plugin for Eclipse IDE. I think it's brilliant. It allows
    you to go from database schema to Hibernate configuration file and
    mapping files, and from them to generate Java code. "Yes", you may say,
    "but there are other plugins that do that". True, but Hibernate Tools
    3.0 are still in alpha4 version, and other plugins are generating
    Hibernate 2.X-compliant code. Hibernate Synchronizer allows you to
    regenerate your Java code every time your database or mappings change -
    with one mouse click. And your custom code will not be wiped out: it
    will keep your customized code. For each mapped entity it will create
    DAO class and a Base class. DAO will incapsulate all Hibernate
    operations, such as load(), save(), delete(), get(), find() etc., while
    Base is a class you can subclass your POJO from, and that's why your
    customized POJO code will not be erased - only Base and DAO are
    regenerated. The only downside is that current version of Hibernate
    Synchronizer generates code for Hibernate 2.X.

    The original Hibernate Synchronizer can be found here:
    http://hibernatesynch.sourceforge.net/

    I modified the original product, and now it generates Hibernate
    3.0-compliant code according with Migration Guide:


    - packages changed from net.sf.hibernate.* to org.hibernate.*
    - deprecated methods like session.find() are replaced with
    session.createQuery()
    - proper exceptions are thrown
    - generated code is modified to use org.hibernate.Session instead of
    net.sf.hibernate.Session (which has been moved to org.hibernate.classic
    package in Hibernate 3.0)



    You can download it here:
    http://www.supremistic.com/pub/hibernate-sync-h3.zip

    Installation:
    Copy contents of the /features/ directory to your
    <Eclipse-install-directory>/features directory.
    Copy contents of the /plugins/ directory to your
    <Eclipse-install-directory>/plugins directory.
    Start Eclipse. Now if you right-click on any *.hbm.xml files, there
    will be a Hibernate Synchronizer menu. Select "Synchronize Files". Java
    code will be regenerated. For more information please refer to original
    documentation here: http://hibernatesynch.sourceforge.net/

    Alternatively, you can follow original installation instructions
    (http://hibernatesynch.sourceforge.net/)(see "How do I install this
    plugin" below on that page) and unzip my archive over it to overwrite
    older files with mine.

    An excellent article called "Working with Hibernate in Eclipse" by
    James Elliott talking about Hibernate Synchronizer can be found here:
    http://www.onjava.com/pub/a/onjava/2004/06/23/hibernate.html

    Enjoy!
    www.supremistic.com

    The related discussion thread is here:
    http://forums.supremistic.com/viewtopic.php?t=163
     
    , Jul 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    0
    Views:
    1,727
    Ilias Lazaridis
    Dec 27, 2004
  2. jstorta
    Replies:
    1
    Views:
    11,774
  3. Eleanna Skouta
    Replies:
    2
    Views:
    8,442
    Arne Vajhøj
    Dec 9, 2008
  4. Amit Jain
    Replies:
    7
    Views:
    3,312
    Amit Jain
    Apr 27, 2009
  5. Michael Thomsen

    syncronizer

    Michael Thomsen, Jul 9, 2009, in forum: VHDL
    Replies:
    2
    Views:
    1,186
    Michael Thomsen
    Jul 10, 2009
Loading...

Share This Page