Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generate or override getter method

 
tehackio teha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have many java classes for querying database. These classes are injected by CDI Weld on managed bean.
Is there any way(cdi, cglib, javassist...) which do not need write this method "get?AsMyObject" all time?
All classes looks like this below:



My web application uses: jboss7, seam 3.1;
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18154
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Tehackio!

I have not studied Weld in detail, but in JSF, you normally would not be coding a lot of "get" method calls to set variables, because JSF is based on Inversion of Control and so JSF itself sets the variables (properties) by invoking the backing bean's "set" methods.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic