may i know in eclipse, is there any feature that will auto generate domain objects with all table relationship properly mapped in class?
can provide me with some reference articles on this?
The model has a central position in a play application. It's the domain-specific representation of the information on which the application operates. Martin fowler defines it as: Responsible for representing concepts of the business, information about the business situation, and business rules.
A Domain model is a conceptual model of the problem domain. By "java domain model" they just mean the java classes representing that model. There's nothing specific to java in the concept. See also Domain Driven Design for an approach to focusing your development on the business domain needs.
You can use something like Hibernate to accomplish this
This plugin set for Eclipse called Hibernate Tools for Eclipse and ANT will do most of the work for you.
In particular it will do Reverse Engineering: The most powerful feature of Hibernate Tools is a database reverse engineering tool that can generate domain model classes and Hibernate mapping files, annotated EJB3 entity beans, HTML documentation or even an entire JBoss Seam application in seconds!
Telosys code generator does this kind of job. It's an Eclipse plugin, it uses the database schema to create a light model that is used to generate the Java code.
There are some predefined templates available on GitHub (for JPA, POJO, Documentation, Spring MVC, etc )
See http://www.telosys.org
and http://marketplace.eclipse.org/content/telosys-tools
Templates : https://github.com/telosys-templates-v3
Articles about code generation with Telosys :
You can use Hibernate Tools 3.0.0.GA either via Eclipse or ANT to auto-generate your hibernate domain entities directly from your database tables.
See tutorial here : http://docs.jboss.org/tools/3.0.0.GA/en/hibernatetools/html_single/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With