In the blog we will see how to call procedure in liferay using jdbc methods. For this i already created a procedure that return 3 result sets (user, contact and account). We iterate these result sets using jdbc methods.
This blog is specially create for learning step by step liferay.We can learn liferay,hooks,ext,portlet,layout ,services and themes with eclipse ide.
Showing posts with label service builder. Show all posts
Showing posts with label service builder. Show all posts
Wednesday, May 16, 2018
Call Procedure in Liferay using jdbc methods
In the blog we will see how to call procedure in liferay using jdbc methods. For this i already created a procedure that return 3 result sets (user, contact and account). We iterate these result sets using jdbc methods.
Labels:
service builder
Saturday, September 23, 2017
Liferay Error : Unable to find model in Dynamic Query
We already know how to write dynamic query in Liferay. If we create Dynamic Query object in same portlet in which our service are then we can use :-
Labels:
Dynamic Query,
Liferay Errors,
service builder
Wednesday, August 30, 2017
How to Access Custom Services in Velocity(VM) files using Service Locator?
In the previous blog we see how to to access Liferay Services in Velocity(VM) files using Service Locator. In this blog we will see how to to access Custom Services in Velocity(VM) files using Service Locator.
Labels:
service builder,
Velocity
Friday, August 18, 2017
How to Access Liferay Services in Velocity(VM) files using Service Locator?
Some time we need to access Liferay Services in our theme or Web content Templates. So today we will discuss how to access Liferay Services in our theme and templates.
Labels:
service builder,
Velocity
Friday, March 3, 2017
Liferay Custom JSON Web Services
Liferay give you JSON web services for its entities like groups, organization etc . You can see all those services by this URL http://localhost:8080/api/jsonws .
But today we will create our own Entity like Student and access the methods by URLs and get JSON response. So Lets start this step by step:-
Labels:
service builder
Monday, December 5, 2016
Connecting to Different Database in Liferay
We already know how to create service builder in Liferay. When we use service builder all our tables goes to default database that is mention in portal-ext.properties or portal-setup-wizard.properties.
But sometimes we need to create tables in a separate database so that all liferay related tables are in default database and our custom tables in another database.So today we will see how to connect Liferay with 2 databases.
So lets start this step by step:-
Labels:
service builder
Saturday, February 27, 2016
Joins using Dynamic Query in Liferay
Today we will discuss about Joins in Dynamic Query . Before reading this blog it is highly recommended to read my previous blog on introduction of dynamic query , how to use AND/OR in dynamic query and Projection in dynamic query. In this blog i am using my own custom tables states and countries. The primary key of countries ie countryId is used as foreign key in states table.
Labels:
Dynamic Query,
service builder
Conjunction(AND) vs Disjunction(OR) Clause using Dynamic Query in Liferay
Today we will discuss about Conjunction ie AND and Disjunction ie OR Clause in Dynamic Query . Before reading this blog it is highly recommended to read my previous blog on introduction of dynamic query.
For each operation we have two ways. So lets start with the example:-
Labels:
Dynamic Query,
service builder
Order By Clause using Dynamic Query in Liferay
Today we will discuss about Order By Clause in Dynamic Query . Before reading this blog it is highly recommended to read my previous blog on introduction of dynamic query.
Lets start with example:-
Labels:
Dynamic Query,
service builder
Friday, February 26, 2016
Projection in Dynamic Query
Today we will discuss about Projection in Dynamic Query .Before reading this blog it is highly recommended to read my previous blog on introduction of dynamic query. We know how to fetch a complete object but what if we want only one column like only userId of User for this we use Projections.
Labels:
Dynamic Query,
service builder
Dynamic Query in Liferay
Today we will discuss about Dynamic Query in Liferay. As we already know Liferay Service Builder provide basic CRUD methods but sometimes we need specific methods with different conditions . For this we have two approaches:-
1)Custom Sql in Liferay.
2)Dynamic Query
The problem with custom query is that we need to build services again and again. But in case of dynamic queries no need to build services.
Labels:
Dynamic Query,
service builder
Monday, October 12, 2015
Service Builder in Liferay
Service builder in Liferay provide a easy way to created services. We just need to provide the table structure in a xml file and all the CRUD methods generate automatically. For custom methods you may create Custom Sql and Finder Methods. Today we create a basic services with just single table and see how to enter data in the table.
So lets start this step by step:-
Labels:
service builder
Monday, February 23, 2015
Creating Portlet and Services using Maven in Liferay
Liferay Portlet And Services using Maven
Defining Maven in a single line is not possible .Maven do many things for us like resolving dependencies, create project structure, build a project, creating war/jar etc. By using Maven you can also create portlet, theme, services without any need of sdk. Before starting this you have to install Maven and Ant in your machine.So it is highly recommended to read my previous blog How to install Maven and How to install Ant.
Labels:
ant,
maven,
service builder
Tuesday, February 17, 2015
Custom Sql With Two Table
Custom sql/sql query with two table
As discussed in my previous article Custom Sql in Liferay , custom sql is used to write native sql query in liferay. Today we will discuss how to write custom query that belong to two or more table like join query. Before Reading this blog it is highly recommended to read my previous blog on Service Builder in Detail and custom sql in liferay .
Labels:
custom sql,
service builder
Monday, February 16, 2015
Many To Many Relationship in Liferay Services
Today we will discuss Many To Many relationship in Liferay
As discuss earlier Liferay Service Builder create tables with service.xml. But is there any way to provide Many To Many relationship between entities. Yes there is today we will discuss Many To Many relationship in liferay. Before Reading this blog it is highly recommended to read my previous blog on Service Builder in Detail.
Labels:
service builder
Tuesday, February 10, 2015
Custom Sql in Liferay
Today we will discuss Custom Sql/Sql query in Liferay
Liferay Service Builder create basic CRUD method but there are some scenarios when we have to write SQL query. For writing native SQL query we use the concept of Custom Query in Liferay. Before Reading this blog it is highly recommended to read my previous blog on Service Builder in Detail.
Labels:
custom sql,
service builder
Sunday, February 8, 2015
Finder method for Service Builder in Liferay
Today we will Discuss Finder method for Service Builder in Liferay
In my Previous article Service Builder in Detail we see that liferay created basic CRUD method automatically but what if we want to add our custom method in Liferay services . There are many ways but creating Finder method is the simplest one.
Labels:
service builder
Wednesday, January 21, 2015
Liferay Service Builder in Detail
Today we will see concept of Service Builder in liferay
Before reading this blog it is highly recommended to read my blog on Service Builder in Liferay .Liferay Service Builder based on hibernate and Spring DI .Service builder create tables automatically as in Hibernate.Service builder generates Services for the entities in two location. These location use the package path describe in service.xml :-
1)docroot/WEB-INF/services/package name
2)docroot/WEB-INF/src/package name
1)docroot/WEB-INF/services/package name
2)docroot/WEB-INF/src/package name
Labels:
service builder
Subscribe to:
Posts (Atom)