When authoring entity beans with CMP fields, VAJ can create getter methods with names like getVar1(), getVar2(), etc. If the fields are of type boolean, VAJ may generate getter methods with names isVar1(), isVar2(), etc. Where is the option to set this behaviour (default naming convention)?

Wayne Kidd

There are 2 ways to add CMP fields to EJBs. One is to use the add CMP field menu path on the bean inside the EJB group. The other is to go to the XXXBean class and add a field like you would any other class. If you chose the second method (and have the create getter and setter flag turned on), you get the isTest() version of the getter. There are a couple of extra steps to turn this field into what you expect. First go back to the fields version of the EJB. You will see the field, but it won't have the little container icon. If you then right-click and click on container managed, the little icon will appear. Then you will also probably want to add the setTest() and isTest() methods to the Remote Interface. Select both methods and right-click and choose add to -> Remote Interface.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact