• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to build all POJOs in one action

 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Javaranch..

I have 5 POJOs and i want to build them in one execution.
What tool must i have?

Thanks
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need is a Java compiler and programming skill.
 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean that 5 POJOs is automatically build and become a tables in database.
May be need some tool for build that POJOs
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is: what you meant with "action"?

Is this a struts action? If so, which struts feature are you using (or any other library you're using) to serialize objects in requests and responses?

If you're going to take your application to this level, I would advise you move to other framework: http://vraptor.caelum.com.br/ with @Consumes( "application/json"). But if you have a lot of code already written using struts, try to find something that allow you serialize JSON objects into the action context and you'll be able to get them already serialized. Something like this http://code.google.com/p/jsonplugin/.

Anyway, consider frameworks like these: VRaptor, RESTEasy, etc, they are more evolved in the "Java web development way of thinking," nothing against Struts but I've been seeing extremely good changes while using http-based technologies! REST with some powerful IoC container behind.

I hope this helps!
 
Vijitha Kumara
Bartender
Pie
Posts: 3918
10
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fandy Akhmad wrote:I mean that 5 POJOs is automatically build and become a tables in database.

You need to automate the schema creation? And you may need to provide clear information about what you are trying to accomplish. Please read TellTheDetails.
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For DDL automatic generation you may use JPA annotations and some persistence provider with this feature enabled.
 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for my unclear post.

I want to generate table use Apache Ant. I know it must use build.xml file.
How the structure of build.xml file?
 
Vijitha Kumara
Bartender
Pie
Posts: 3918
10
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fandy Akhmad wrote:...How the structure of build.xml file?

I suggest you start with the simple Ant guide provided in the manual itself here.
 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your suggestion.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic