History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: EJB-89
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vance Karimi
Reporter: Ali Abdel-Aziz
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
EJB Cartridge

Bug in generating Accessor function in EJB3 Cartridge

Created: 18/Sep/07 07:43 PM   Updated: 07/Nov/07 02:02 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description   
The EntityEmbeddable.vsl in andromda-ejb3-cartridge-1.0-SNAPSHOT used the simple way for generating the setter and getter methods that is it add "get" in front of any property to generate the getter
for example modeling property field with primitive data type boolean in Entity class for example name it isActive property inside User class this will yield getIsActive() in the Entity class (User.java).
This will cause problem because this naming conventions is not the one used in ValueObject.vsl in andromda-java-cartridge that it detects the boolean properties to add "is" in front of property name and this yield isIsActive()
in the Value Object class.
and this causes a problem because there is interaction between VO and DAO, and each one follows its naming conventions.

I tried to find the place I need to alter to fix this and I found the following function inside the EJB3EntityAttributeFacadeLogicImpl.java
Code:
    /**
     * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName()
     */
   public String getGetterName()
   {
        return "get" + StringUtils.capitalize(super.getName());
   }

But I decided to report this issue.

 All   Comments   Change History      Sort Order:
Comment by Vance Karimi [07/Nov/07 02:02 PM]
Fix in cvs.