Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-73408

Liferay Service Builder does not generate a "get" method for LocalService when the entity name ends in "Service"

    Details

      Description

      Description
      When using an entity name that ends with the word "Service", Liferay Service Builder does not generate a "get" method in the generated LocalService class.

      For example, if the entity name "TestService" is used, Liferay Service Builder will generate a LocalService class for that entity, called TestServiceLocalService.java.
      But, the generated class will be missing a method: getTestService, which is expected to be generated.

      Steps to Reproduce

      1. Setup liferay-blade-samples' ServiceBuilder
      2. Navigate to: gradle/blade.servicebuilder.svc
        • Modify service.xml
          • Change Entity name from "Foo" to "TestService"
        • Build service using gradle
          gradlew buildService
          
      1. Navigate to: gradle/blade.servicebuilder.api
        • Locate TestServiceLocalService.java
          ./blade.servicebuilder.api/src/main/java/com/liferay/blade/samples/servicebuilder/service/TestServiceLocalService.java
          
        • View TestServiceLocalService.java

      Expected:
      Generated file should contain the method: getTestService
      Actual:
      Generated file does not contain the method: getTestService

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 42 weeks, 5 days ago