Search in sources :

Example 1 with Fields

use of com.liferay.portlet.dynamicdatamapping.storage.Fields in project liferay-ide by liferay.

the class StorageAdapterCreateUpdateMethodsTest method updateFieldValues.

protected void updateFieldValues(long storageId, Map<String, String> fieldValues) throws Exception {
    Fields fields = new Fields();
    for (Map.Entry<String, String> entry : fieldValues.entrySet()) {
        Field field = new Field(storageId, entry.getKey(), entry.getValue());
        fields.put(field);
    }
    ServiceContext serviceContext = new ServiceContext();
    StorageEngineUtil.update(storageId, fields, true, serviceContext);
}
Also used : Field(com.liferay.portlet.dynamicdatamapping.storage.Field) Fields(com.liferay.portlet.dynamicdatamapping.storage.Fields) ServiceContext(com.liferay.portal.service.ServiceContext) Map(java.util.Map)

Aggregations

ServiceContext (com.liferay.portal.service.ServiceContext)1 Field (com.liferay.portlet.dynamicdatamapping.storage.Field)1 Fields (com.liferay.portlet.dynamicdatamapping.storage.Fields)1 Map (java.util.Map)1