facebook

Abstract Class

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #222625 Reply

    Kevin_L
    Member

    Hi Guys,

    I would like to know why myEclipse hibernate tool created abstract class from regulat table entity from mySQL. I mean everything works fine ………

    I was able to modifythe class file and hibernate map file manually and everything works fine…..

    I am just wondering why it abstract class instead of just regular class.

    P.S. I know what abstract class mean… 🙂 does hibernate tool somhow detect metadata from mysql and decided to create abstract class????

    Keep up the good work!
    K~

    #222627 Reply

    Riyad Kalla
    Member

    Kevin,
    If you go to edit the Abstract class, note the comment at the top. The idea is that if you every make any customizations to the Abstract classes, they will be erased and overwrriten next time you regenerate them. So MyEclipse, Hibernate Synchronizer and other tools like this work around the problem by generating an Abstract class and a concrete subsclass for every table. That way you can put all your customizations (maybe fancy toString methods, or comparator methods or something) in the concrete subclass that is never regenerated, that way you can regenerate the asbtract classes as much as you want without loosing your changes.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Abstract Class

You must be logged in to post in the forum log in