It's not a secret anymore!*
The moose likes Other Java Products and Servers and the fly likes Problem with Xdoclet and Hbm2java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Problem with Xdoclet and Hbm2java" Watch "Problem with Xdoclet and Hbm2java" New topic
Author

Problem with Xdoclet and Hbm2java

Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi
In my project i am using hibernate along wih xdoclet. I am using hbm2java to generate pojo's. In my Enterprise beans i am using Xdoclet and to auto generate the code. In my ejbCreate() method it has parameters and i am trying to set the parameter to pojo's parameter. But since the attribute is private in pojo i am unable to access it. I am also adding a piece of code for clear understanding.

POJO:

public class OrgPOJO{
private Long orgId;
public int getOrgId(){return orgId; }
public void setOrgId(Long orgId){this.orgId = orgId;}
}

EnterpriseBean:

public class OrgBMP{
OrgPOJO pojo = new OrgPOJO
public OrgPK ejbCreate(orgId){
pojo.setOrgId(orgId);
}
since the pojo is doesnt have a public attribute...how do i set it's value...?? any idea??
}


Regards,<br />Venkat Dasari<br />SCJP 1.4, SCBCD.
Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi
In my project i am using hibernate along wih xdoclet. I am using hbm2java to generate pojo's. In my Enterprise beans i am using Xdoclet and to auto generate the code. In my ejbCreate() method it has parameters and i am trying to set these parameters in ejbCreate() to pojo's parameter. But since the attribute is private in pojo i am unable to access it. I am also adding a piece of code for clear understanding.

POJO:

public class OrgPOJO{
private Long orgId;
public int getOrgId(){return orgId; }
public void setOrgId(Long orgId){this.orgId = orgId;}
}

EnterpriseBean:

public class OrgBMP{
OrgPOJO pojo = new OrgPOJO
/**This code must be auto generated. */
public OrgPK ejbCreate(orgId){
pojo.setOrgId(orgId);
/**-----*/
}
}
since the pojo doesnt have a public attribute...how do i set it's value...?? any idea??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Xdoclet and Hbm2java