21 September, 2013

Useful Expando Service Methods

Hello Friends,

Below are some expando service methods which can be frequently useful if you are playing with expando tables.

1) Create Expando table

ExpandoTable table = ExpandoTableLocalServiceUtil.addTable(long companyId, long classNameId, String tableName);


2) Create Columns

ExpandoColumn column = ExpandoColumnLocalServiceUtil.addColumn(
        long tableId, String name, int type);

3) Create Rows

ExpandoRow row = ExpandoRowLocalServiceUtil.addRow(long tableId, long classPK);

4) Store Value

ExpandoValue value = ExpandoValueLocalServiceUtil.addValue(
        long classNameId, long tableId, long columnId, long classPK,String data);

5) Remove operations

Table:
ExpandoTableLocalServiceUtil.deleteTable(long tableId)
Column:
ExpandoColumnLocalServiceUtil.deleteColumn(long columnId)
Row:
ExpandoRowLocalServiceUtil.deleteRow(long rowId)
Value:
ExpandoValueLocalServiceUtil.deleteValue(long valueId)

6) Update Operations

Table:
ExpandoTableLocalServiceUtil.updateTable(long tableId, String name)
ExpandoTableLocalServiceUtil.updateExpandoTable(ExpandoTable table)
Column:
ExpandoColumnLocalServiceUtil.updateColumn(long columnId,String name, int type)
ExpandoColumnLocalServiceUtil.updateExpandoColumn(
        com.liferay.portlet.expando.model.ExpandoColumn expandoColumn);
Row:
ExpandoRowLocalServiceUtil.updateExpandoRow(
        com.liferay.portlet.expando.model.ExpandoRow expandoRow)
Value:
ExpandoValueLocalServiceUtil.updateExpandoValue(
        com.liferay.portlet.expando.model.ExpandoValue expandoValue)


Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...