Abhishek Jain
Abhishek Jain

Reputation: 236

How to override UserFinderImpl in liferay 7?

I need to override UserFinderImpl to execute custom sql queries. I developed this project using dynamic query. But I need to make it via custom sql.So please tell me how to do that? Thanx in advance..

Upvotes: 0

Views: 159

Answers (1)

Milen Dyankov
Milen Dyankov

Reputation: 3062

UserFinderImpl is considered internal class and it's not meant to be extended / overridden / replaced. Before Liferay 7, doing such thing was only discouraged and considered bad practice. Due to monolith approach and EXT plugins, it was not possible to enforce such isolation.

The modular architecture or Liferay 7 (based on OSGi) allowed to encapsulate and isolate internal classes and only allow extensions via well defined public APIs. There is no extension point in Liferay 7 that allows you to override / modify UserFinderImpl. If you absolutely need to do that you would have to compile from source with your modifications in place (which is basically what EXT plugins were doing in a bit more sophisticated way before Liferay 7).

Upvotes: 2

Related Questions