Liferay’s Service Builder can generate your project’s persistence layer by automating the creation of interfaces and classes. Your application’s persistence layer persists data represented by your configured entities to a database. In fact, your local service implementation classes are responsible for calling the persistence layer to retrieve and store your application’s data. So instead of taking the time-consuming route of writing your own persistence layer, you can use Liferay’s Service Builder to quickly define your entities and generate the layer instantaneously.

In this section of tutorials, you’ll learn how to define an object-relational map and generate your persistence layer from that map. You’ll also learn about the local and remote services Service Builder generates, and how you can use them for your own application. You’ll also discuss how to use the ServiceContext class, model hints, SQL queries, and Hibernate’s criteria API.

Defining an Object-Relational Map with Service Builder

In this tutorial, you’ll learn how to define an object relational map for your application so that it can persist data. As an example, you’ll examine the existing Liferay Bookmarks application that...

Read More

Running Service Builder and Understanding the Generated Code

This tutorial explains how to run Service Builder and provides an overview of the code that Service Builder generates. If you’d like to use Service Builder in your application but haven’t yet...

Read More

Understanding ServiceContext

The ServiceContext class is a parameter class used for passing contextual information for a service. Using a parameter class lets you consolidate many different methods with different sets of...

Read More

Customizing Model Entities With Model Hints

If you’ve already used Service Builder to define your model entities and have implemented business logic for creating and modifying those entities, you might have some ideas for helping users to...

Read More

Custom SQL

Service Builder creates finder methods that retrieve entities by their attributes: their column values. When you add a column as a parameter for the finder in your service.xml file and run Service...

Read More

Dynamic Query

Liferay lets you use custom SQL queries to retrieve data from the database. However, it’s sometimes more convenient to build queries dynamically at runtime than it is to invoke predefined SQL...

Read More

Configuring service.properties

In this tutorial, you’ll learn how to use and edit the service.properties file. You’ll also learn about the properties included in this file and how to set them to fit your needs. Service Builder...

Read More

Connecting Service Builder to External Data Sources

Sometimes you want to use a data source other than Liferay Portal’s. To do this, the data source must be defined in portal-ext.properties or configured as a JNDI data source on Liferay Portal’s app...

Read More
0 (0 Votes)
What is Service Builder? Previous