title: How to build simple code generator in java
body: <p>I want to build a simple code generator in java that can take database connection string and then create the model layer for each table in database , I don't know how can I do that , so if any one has any tutorial or links that may help me complete this task i will be thankful</p>
  
  <p>Thanks in Advance</p>
  
  <hr>
  
  <p>I have found a good example on code project that can take the database and make a good code generation for the tables in database , but unfortunately it is written in C# and also generate C# code</p>
  
  <p>I don't know if it right to generate C# code and then convert them to java using any conversion software , or the right thing is to try to modify it to generate java classes instead of C# classes</p>
  
  <p>by the way the link for the example is <a href="http://www.codeproject.com/KB/codegen/TierGenerator.aspx" rel="noreferrer">http://www.codeproject.com/KB/codegen/TierGenerator.aspx</a></p>
  
  <p>I need your advice as soon as you can</p>
  
  <p>Thanks in Advance</p>