java - custom-sql when I only imported the service (Liferay) -
hey guys liferay question,
i using service builder communicate database. thing using same tables 2 of portlets, imported jar created in 1 of portlets other one,, need create custom sql on both of them.. how create finderimpl class? don't have persistence folder on other portlet because service.jar imported.. doing right? should this?
thanks
if second project not contain custom entity create dummy entity of service builder service builder create service structure i.e dummy localserviceimpl, serviceimpl you.
to create dummy entity, don't mention column in entity element of service.xml
<service-builder package-path="com.custom"> <author>yourname</author> <namespace>mycustom</namespace> <entity name="mydummyentity" local-service="true" remote-service="true" > </entity> <service-builder>
so create com.custom.service..... packages.
now create com.custom.service.persistance package , go ahead custom sql concept of liferay. i.e creating finder , implementing same.
your finder class definition :
public mydummyentityfinderimpl extends basepersistenceimpl implements mydummyentityfinder{
.... }
Comments
Post a Comment