Any reason for multiple parameter constructor in a persistence class?

I am working on a Java web application that I inherited that uses Spring and Hibernate. This application contains persistence classes that were automatically generated using hbm2java. Included in these classes were constructors with multiple parameters (as well as your typical default constructor). These non-default constructors are not being directly accessed by any other methods. Nor is there any explicit spring definition for calling these classes, so it appears that it is dead code... Now I know this question is hideously vague, but would there be any normal reason where Hibernate would normally invoke these constructors through reflection? I know it uses `Class.getInstance()` to invoke the default constructor to create a new instance of the object, but that's about it...

以上就是Any reason for multiple parameter constructor in a persistence class?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏