Java Code Generator for CRUD classes [message #1427878] |
Sat, 20 September 2014 23:54 |
Cyrix Who Messages: 1 Registered: September 2014 |
Junior Member |
|
|
Hello everyone,
I am working on a project that requires CRUD operations on 500+ database tables with Java. For each table, I created one class with different methods (create, read, update and delete); and another class to return JSON format data for each methods ; and lastly, there is a HTML web page to display JSON data with JQuery.
This sounds easy because I can do coding for each table one by one. However there are a lot of repeated works. The class names, methods, parameters are all different but the logic are all the same, simple create/read/update/delete operations.
Is there a better way to handle this, such as a code generator?
By the way, I use eclipse as my development tool.
Thanks!
Cyrix.
|
|
|
Re: Java Code Generator for CRUD classes [message #1428265 is a reply to message #1427878] |
Sun, 21 September 2014 14:58 |
|
On 09/20/2014 06:39 PM, Cyrix Who wrote:
> Hello everyone,
>
> I am working on a project that requires CRUD operations on 500+ database
> tables with Java. For each table, I created one class with different
> methods (create, read, update and delete); and another class to return
> JSON format data for each methods ; and lastly, there is a HTML web page
> to display JSON data with JQuery.
>
> This sounds easy because I can do coding for each table one by one.
> However there are a lot of repeated works. The class names, methods,
> parameters are all different but the logic are all the same, simple
> create/read/update/delete operations.
> Is there a better way to handle this, such as a code generator?
> By the way, I use eclipse as my development tool.
>
> Thanks!
> Cyrix.
This is a Java question and rather not for this forum. Better would be
javaranch.com or stackoverflow.com.
However, based on the little you've said, I would think you need to
investigate an ORM like Hibernate.
|
|
|
Powered by
FUDForum. Page generated in 0.03864 seconds