O'Reilly logo

Enterprise Application Development with Ext JS and Spring by Gerald Gierer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Refactoring the Java classes

The classes generated by the reverse engineering process can be improved upon with a little refactoring to make the code more readable and easier to understand. Some of the autogenerated properties and fields have id in their name when we are actually referring to classes, while the collection of java.util.List objects have list in their name. Let's start with the Company.java file.

The Company.java file

This file represents the Company entity. Double-click on the file to open it in the editor and browse through the contents. This class is a simple POJO with set and get methods for each property in addition to the standard hashCode, equals, and toString methods. The class has a no-arg constructor (required by the JPA ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required