• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Xdoclet and Hbm2java

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
}
 
Venkat dasari
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic