sasmita swain:
hi
i have done same way.ut it is not retrieving.can u give me codes?
Hi sasmita swain , as per your code in your service.xml you have already added finder method for the column
empNamesame way you have to add finder on column as below
<finder name="UserId" return-type="Collection">
<finder-column name="userId" />
</finder>
Than build service.
Next Go to *LocalServiceimpl.java add your finder code
public List<Employee> findByUserId(long userId) throws SystemException
{
List<Employee> empObj=employeePersistence.findByUserId(userId);
return empObj;
}
Now again build service again.
So you have findByUserId method accessible through EmployeeLocalServiceUtil.findByUserId(userId)
Thanks & Regards,
Vishal R. Panchal
Please sign in to flag this as inappropriate.