Example usage for com.liferay.portal.kernel.search Summary setEscape

List of usage examples for com.liferay.portal.kernel.search Summary setEscape

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.search Summary setEscape.

Prototype

public void setEscape(boolean escape) 

Source Link

Usage

From source file:com.liferay.message.boards.comment.internal.search.MBMessageCommentSearchResultContributor.java

License:Open Source License

@Override
public void addRelatedModel(SearchResult searchResult, Document document, Locale locale,
        PortletRequest portletRequest, PortletResponse portletResponse) throws PortalException {

    long entryClassPK = GetterUtil.getLong(document.get(Field.ENTRY_CLASS_PK));

    MBMessage mbMessage = _mbMessageLocalService.getMessage(entryClassPK);

    Comment comment = _commentManager.fetchComment(mbMessage.getMessageId());

    Summary summary = new Summary(null, mbMessage.getBody());

    summary.setEscape(false);

    searchResult.addComment(comment, summary);
}