Foros de discusión

liferay-maven-plugin doesn't create finder functions in local service layer

Ralf Haller, modificado hace 6 años.

liferay-maven-plugin doesn't create finder functions in local service layer

Junior Member Mensajes: 54 Fecha de incorporación: 13/05/13 Mensajes recientes
Hi,

I want to create a service builder project with Maven using liferay-maven plugin for Liferay 6.2.5. For setting up the project I am using the Maven archetype "liferay-servicebuilder-archetype" in version 6.2.5. When running mvn liferay:build-service everything seems to build fine. However no finder is created in the local service layer.

Here's what I have:

service.xml containing a finder "Field2:



<service-builder package-path="test">
	<namespace>service</namespace>
	<entity name="Foo" uuid="true" local-service="true" remote-service="true">

		<!-- PK fields -->

		<column name="fooId" type="long" primary="true" />

		<!-- Group instance -->

		<column name="groupId" type="long" />

		<!-- Audit fields -->

		<column name="companyId" type="long" />
		<column name="userId" type="long" />
		<column name="userName" type="String" />
		<column name="createDate" type="Date" />
		<column name="modifiedDate" type="Date" />

		<!-- Other fields -->

		<column name="field1" type="String" />
		<column name="field2" type="boolean" />
		<column name="field3" type="int" />
		<column name="field4" type="Date" />
		<column name="field5" type="String" />

		<!-- Order -->

		<order by="asc">
			<order-column name="field1" />
		</order>

		<!-- Finder methods -->

		<finder name="Field2" return-type="Collection">
			<finder-column name="field2" />
		</finder>

		<!-- References -->

		<reference package-path="com.liferay.portlet.asset" entity="AssetEntry" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetTag" />
	</entity>
</service-builder>


Maven run:


[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] service
[INFO] service Portlet Service
[INFO] service Portlet
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building service 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- liferay-maven-plugin:6.2.5:build-service (default-cli) @ service ---
[INFO] Skipping service
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building service Portlet Service 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- liferay-maven-plugin:6.2.5:build-service (default-cli) @ service-portlet-service ---
[INFO] Building from /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/webapp/WEB-INF/service.xml
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/system.properties
Okt 20, 2017 8:03:24 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
INFORMATION: Global shared lib directory /Users/ralfhaller/.m2/repository/javax/servlet/servlet-api/2.5/
Okt 20, 2017 8:03:24 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
INFORMATION: Global lib directory /Users/ralfhaller/.m2/repository/com/liferay/portal/portal-service/6.2.5/
Okt 20, 2017 8:03:24 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
INFORMATION: Portal lib directory /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/
Okt 20, 2017 8:03:24 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
INFORMATION: Properties for portal loaded from [jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/portal.properties]
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
Building Foo
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/persistence/FooActionableDynamicQuery.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/persistence/FooExportActionableDynamicQuery.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/persistence/FooPersistenceImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/persistence/FooPersistence.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/persistence/FooUtil.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/model/impl/FooModelImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/model/impl/FooBaseImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/model/impl/FooImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/model/FooModel.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/model/Foo.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/model/impl/FooCacheModel.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/model/FooClp.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/model/FooWrapper.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/model/FooSoap.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/impl/FooLocalServiceImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/base/FooLocalServiceBaseImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooLocalService.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooLocalServiceUtil.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooLocalServiceClp.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/base/FooLocalServiceClpInvoker.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooLocalServiceWrapper.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/impl/FooServiceImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/base/FooServiceBaseImpl.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooService.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooServiceUtil.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooServiceClp.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/base/FooServiceClpInvoker.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/FooServiceWrapper.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/../service-portlet/src/main/java/test/service/http/FooServiceSoap.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/messaging/ClpMessageListener.java
Writing /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet-service/src/main/java/test/service/ClpSerializer.java
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building service Portlet 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- liferay-maven-plugin:6.2.5:build-service (default-cli) @ service-portlet ---
[INFO] Building from /Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet/src/main/webapp/WEB-INF/service.xml
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading jar:file:/Users/ralfhaller/Documents/Workspace/ServiceBuilder/service/service-portlet/target/liferay-work/appServerPortalDir/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
Building Foo
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] service ............................................ SUCCESS [  0.494 s]
[INFO] service Portlet Service ............................ SUCCESS [ 32.665 s]
[INFO] service Portlet .................................... SUCCESS [ 33.451 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:06 min
[INFO] Finished at: 2017-10-20T08:04:15+02:00
[INFO] Final Memory: 79M/699M
[INFO] ------------------------------------------------------------------------


Generated FooLocalService:

package test.service;

import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.portal.service.BaseLocalService;
import com.liferay.portal.service.InvokableLocalService;
import com.liferay.portal.service.PersistedModelLocalService;

/**
 * Provides the local service interface for Foo. Methods of this
 * service will not have security checks based on the propagated JAAS
 * credentials because this service can only be accessed from within the same
 * VM.
 *
 * @author Brian Wing Shun Chan
 * @see FooLocalServiceUtil
 * @see test.service.base.FooLocalServiceBaseImpl
 * @see test.service.impl.FooLocalServiceImpl
 * @generated
 */
@Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
    PortalException.class, SystemException.class}
)
public interface FooLocalService extends BaseLocalService, InvokableLocalService,
    PersistedModelLocalService {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this interface directly. Always use {@link FooLocalServiceUtil} to access the foo local service. Add custom service methods to {@link test.service.impl.FooLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
     */

    /**
    * Adds the foo to the database. Also notifies the appropriate model listeners.
    *
    * @param foo the foo
    * @return the foo that was added
    * @throws SystemException if a system exception occurred
    */
    @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
    public test.model.Foo addFoo(test.model.Foo foo)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Creates a new foo with the primary key. Does not add the foo to the database.
    *
    * @param fooId the primary key for the new foo
    * @return the new foo
    */
    public test.model.Foo createFoo(long fooId);

    /**
    * Deletes the foo with the primary key from the database. Also notifies the appropriate model listeners.
    *
    * @param fooId the primary key of the foo
    * @return the foo that was removed
    * @throws PortalException if a foo with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
    public test.model.Foo deleteFoo(long fooId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Deletes the foo from the database. Also notifies the appropriate model listeners.
    *
    * @param foo the foo
    * @return the foo that was removed
    * @throws SystemException if a system exception occurred
    */
    @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
    public test.model.Foo deleteFoo(test.model.Foo foo)
        throws com.liferay.portal.kernel.exception.SystemException;

    public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();

    /**
    * Performs a dynamic query on the database and returns the matching rows.
    *
    * @param dynamicQuery the dynamic query
    * @return the matching rows
    * @throws SystemException if a system exception occurred
    */
    @SuppressWarnings("rawtypes")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Performs a dynamic query on the database and returns a range of the matching rows.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link test.model.impl.FooModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param dynamicQuery the dynamic query
    * @param start the lower bound of the range of model instances
    * @param end the upper bound of the range of model instances (not inclusive)
    * @return the range of matching rows
    * @throws SystemException if a system exception occurred
    */
    @SuppressWarnings("rawtypes")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end) throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Performs a dynamic query on the database and returns an ordered range of the matching rows.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link test.model.impl.FooModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param dynamicQuery the dynamic query
    * @param start the lower bound of the range of model instances
    * @param end the upper bound of the range of model instances (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching rows
    * @throws SystemException if a system exception occurred
    */
    @SuppressWarnings("rawtypes")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of rows that match the dynamic query.
    *
    * @param dynamicQuery the dynamic query
    * @return the number of rows that match the dynamic query
    * @throws SystemException if a system exception occurred
    */
    public long dynamicQueryCount(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of rows that match the dynamic query.
    *
    * @param dynamicQuery the dynamic query
    * @param projection the projection to apply to the query
    * @return the number of rows that match the dynamic query
    * @throws SystemException if a system exception occurred
    */
    public long dynamicQueryCount(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
        com.liferay.portal.kernel.dao.orm.Projection projection)
        throws com.liferay.portal.kernel.exception.SystemException;

    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo fetchFoo(long fooId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the foo with the matching UUID and company.
    *
    * @param uuid the foo's UUID
    * @param companyId the primary key of the company
    * @return the matching foo, or <code>null</code> if a matching foo could not be found
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo fetchFooByUuidAndCompanyId(java.lang.String uuid,
        long companyId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the foo matching the UUID and group.
    *
    * @param uuid the foo's UUID
    * @param groupId the primary key of the group
    * @return the matching foo, or <code>null</code> if a matching foo could not be found
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo fetchFooByUuidAndGroupId(java.lang.String uuid,
        long groupId)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the foo with the primary key.
    *
    * @param fooId the primary key of the foo
    * @return the foo
    * @throws PortalException if a foo with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo getFoo(long fooId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public com.liferay.portal.model.PersistedModel getPersistedModel(
        java.io.Serializable primaryKeyObj)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the foo with the matching UUID and company.
    *
    * @param uuid the foo's UUID
    * @param companyId the primary key of the company
    * @return the matching foo
    * @throws PortalException if a matching foo could not be found
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo getFooByUuidAndCompanyId(java.lang.String uuid,
        long companyId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the foo matching the UUID and group.
    *
    * @param uuid the foo's UUID
    * @param groupId the primary key of the group
    * @return the matching foo
    * @throws PortalException if a matching foo could not be found
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public test.model.Foo getFooByUuidAndGroupId(java.lang.String uuid,
        long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the foos.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link test.model.impl.FooModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of foos
    * @param end the upper bound of the range of foos (not inclusive)
    * @return the range of foos
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public java.util.List<test.model.foo> getFoos(int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of foos.
    *
    * @return the number of foos
    * @throws SystemException if a system exception occurred
    */
    @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
    public int getFoosCount()
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Updates the foo in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
    *
    * @param foo the foo
    * @return the foo that was updated
    * @throws SystemException if a system exception occurred
    */
    @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
    public test.model.Foo updateFoo(test.model.Foo foo)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the Spring bean ID for this bean.
    *
    * @return the Spring bean ID for this bean
    */
    public java.lang.String getBeanIdentifier();

    /**
    * Sets the Spring bean ID for this bean.
    *
    * @param beanIdentifier the Spring bean ID for this bean
    */
    public void setBeanIdentifier(java.lang.String beanIdentifier);

    @Override
    public java.lang.Object invokeMethod(java.lang.String name,
        java.lang.String[] parameterTypes, java.lang.Object[] arguments)
        throws java.lang.Throwable;
}
</test.model.foo>


As you can see no getFoosByField2 is created here. Why is that? What am I missing?

Ralf
thumbnail
David H Nebinger, modificado hace 6 años.

RE: liferay-maven-plugin doesn't create finder functions in local service l

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
I'm not sure what the driver for the change was, but basically finders are not exposed by default. And generally I guess I can understand why...

I mean, conceptually you can deem the finders as "internals" for the database access and therefore should not be exposed by default as part of the API, forcing you to expose finders as necessary.

On the other hand, as a lazy developer I miss having that exposed for me because now I have to add all of those bridge functions emoticon

The good news is that they are easy to add. Just put the bridge method in the FooLocalServiceImpl guy to invoke the fooPersistence.getFoosByField2() method. ServiceBuilder will inject the persistence layer into your instance, so you can avoid all of the static util classes.