Results 1 to 9 of 9

Thread: Finders not in Service

  1. #1
    Join Date
    Jan 2012
    Posts
    2

    Default Finders not in Service

    I am creating entities and attaching a service to them using the service command. However, only the initially created finders are being added to the service layer. Any finders created with the finder add command are still exclusively in the entity.

    Is this just how Roo is working out of the box in 1.2, or am I doing something incorrect?

  2. #2
    Join Date
    Dec 2005
    Posts
    935

    Default

    Finders are currently only available on active record entities.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Jan 2012
    Posts
    2

    Default

    Thank you for clarifying!

  4. #4
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Alan, I noticed you can add several entities manually in the service after creation. Are multiple entities going to be able to create also from a Roo command in a coming version?
    Last edited by MiB; Feb 3rd, 2012 at 02:37 PM.

  5. #5
    Join Date
    Dec 2005
    Posts
    935

    Default

    The service command currently accepts the one entity, but it could be changed to accept multiple entities. However, you wouldn't get command line completion - it would be similar to the --includeTables on the database reverse engineer command, due to shell limitations. We could also just let the service command be able to be run several times, each with a different entity, and this entity would be added to the annotation. Raise a jira request if you like.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  6. #6
    Join Date
    Nov 2008
    Posts
    25

    Default JIRA openned?

    did anyone open the JIRA for the multiple entities for a service?

    Is there any plans for having something like:
    If I would want to have a service with a getTotalAccountBalance method which in the implementation only would based on the business logic refer to combination of different entity types and their instances. Meaning that the clients would only be exposed to the method without having any clue as to the details of the implementation; only the service implementation tied to the entities. And/or perhaps a service referring to other services and not to entities...
    Last edited by melutovich; Feb 2nd, 2012 at 06:40 AM.

  7. #7
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Are you referring to AspectJ methods in the service itd-files here?

  8. #8
    Join Date
    Nov 2008
    Posts
    25

    Default

    Alan said
    The service command currently accepts the one entity, but it could be changed to accept multiple entities. However, you wouldn't get command line completion - it would be similar to the --includeTables on the database reverse engineer command, due to shell limitations. We could also just let the service command be able to be run several times, each with a different entity, and this entity would be added to the annotation. Raise a jira request if you like.
    I was referring to that when I asked about the JIRA.

    I added in a related but different scenario:
    Is there any plans for having something like:
    If I would want to have a service with a getTotalAccountBalance method which in the implementation only would based on the business logic refer to combination of different entity types and their instances. Meaning that the clients would only be exposed to the method without having any clue as to the details of the implementation; only the service implementation tied to the entities. And/or perhaps a service referring to other services and not to entities...
    (Perhaps a better name for the method would be calculateTotalAccountBalance.) I assume to implement this I would want the service interface to not be tied to ANY entity(a service interface without even one entity), and only the implementation to be tied to them. Then one would manually add the getTotalAccountBalance to the service interface. The service interface might deal with an Account interface...

    Currently the service command operates on one and only one entity, there was discussion about having that be one or more, I'm interested in a service linked at the interface to no entities and only the implementation linked to the entities.

  9. #9
    Join Date
    Nov 2008
    Posts
    25

    Default

    Any more comments?

Posting Permissions

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