Results 1 to 6 of 6

Thread: How to work with ROO Pojos

  1. #1
    Join Date
    Jan 2008
    Posts
    253

    Default How to work with ROO Pojos

    This is prob a stupid question, but with all the getter/setter specified inside aspects, how do you actually get and set data from another object that is not ROO managed?

    I don't get it.

  2. #2
    Join Date
    Jan 2008
    Posts
    253

    Default

    Ok, you need to use STS and enable the aspectJ tools.

  3. #3

    Default

    The get and set may be in the aspects, but they are woven inside the clases at compilation time, that means you can act like if they were inside the class, for example assuming you have a person entity with a name field you can use:


    Person p=new Person();
    p.getName();

    And it will compile perfectly by using maven, you only need ajdt support if you want code completion to work in eclipse, but not to compile or use Roo POJOS from any place.

    regards, Raśl

  4. #4
    Join Date
    Jan 2008
    Posts
    253

    Default

    Yes, but your ide will be red with errors unless it recognizes the aspects, which STS does. Not sure how you would make a standard Eclipse do that, but I'm sure it's possible.

  5. #5

    Default

    Not sure if this is the appropiate place for this, but to make any eclipse recognize the aspects i think you only need to install the AspectJ Development Tools plugin, but you will loose all roo, spring and maven integration STS provides.

    Regards

  6. #6
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    668

    Post Watch out for the AspectJ plugin version

    Quote Originally Posted by raul.arabaolaza View Post
    it will compile perfectly by using maven
    Only if you use version 1.2 or earlier of the AspectJ plugin, or if you apply one of the workarounds provided here:

    http://stackoverflow.com/questions/2...ava-1-6-source
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •