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);
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);
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);
com.liferay.portlet.expando.model.ExpandoColumn expandoColumn);
Row:
ExpandoRowLocalServiceUtil.updateExpandoRow(
com.liferay.portlet.expando.model.ExpandoRow expandoRow)
com.liferay.portlet.expando.model.ExpandoRow expandoRow)
Value:
ExpandoValueLocalServiceUtil.updateExpandoValue(
com.liferay.portlet.expando.model.ExpandoValue expandoValue)
com.liferay.portlet.expando.model.ExpandoValue expandoValue)