I create some services using Liferay 7 . But FinderImpl and FinderUtil classes are not created after building services.The steps I followed are as follows:
Result: it creates the table but *FinderImpl and *FinderUtil classes are not there in the project.
You have to create your *FinderImpl
class and rebuild service because Finder classes are not created by default. According to the Liferay documentation:
The first step is to create a
*FinderImpl
class in the service persistence package. For the Guestbook application, for example, you could create aEntryFinderImpl
class in thecom.liferay.docs.guestbook.service.persistence.impl
package. Your class should extendBasePersistenceImpl<Entry>
.Run Service Builder to generate the
*Finder
interface and the*Util
class for the finder. Service Builder generates the*Finder
interface and the*FinderUtil
utility class based on the*FinderImpl
class. Modify your*FinderImpl
class to have it implement the*Finder
interface you just generated:
Source: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/custom-sql