-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: custom ReverseEngineeringStrategy
PostPosted: Tue Aug 31, 2010 5:21 am 
Newbie

Joined: Mon Aug 30, 2010 11:04 am
Posts: 2
I have created a new class to customize the default ReverseEngineeringStrategy.
I am specifying the full name of the new class in the "Hibernate Code Generation" configuration of Eclipse but unfortunately i don't see any affect of it.

Do you have any idea about the problem? What should i check?

Custom ReverseEngineeringStrategy class that i use is as follows:

Code:
public class MyReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy {   


/**   
   * Constructor   
   *   
   * @param delegate {@link org.hibernate.cfg.reveng.ReverseEngineeringStrategy}   
   */   
  public MyReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) {   
   super(delegate); 
  }
 
  public String columnToPropertyName(TableIdentifier table, String column) {

     if(column.endsWith("PACK_ID")) {

      return "PACKNUMBER";

     } else {

      return super.columnToPropertyName(table, column);

     }
  }
 
}



Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.