Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating liferay service builder without configuring any database

Is it possible to create liferay service builder without any configuring any database tables in service.xml file.

Actually purpose here is to create a service layer using liferay service builder. And there is no database interaction directly in this service layer.

like image 567
DAIRAV Avatar asked May 05 '16 02:05

DAIRAV


1 Answers

Yes, and it's quite simple. While you still need an entity (which provides the name for your service) you can leave this entity definition empty.

This will create the service (local or remote, as configured in the entity) but no model, no persistence and no database table.

One of the situations where this comes in really handy is when you want to add another method to an existing service (which you can't) - you just create a new service with your custom methods and delegate to the original service.

like image 86
Olaf Kock Avatar answered Sep 28 '22 17:09

Olaf Kock