Search in sources :

Example 1 with DLFileEntry

use of com.liferay.document.library.kernel.model.DLFileEntry in project liferay-ide by liferay.

the class AlbumIndexer method addRelatedEntryFields.

@Override
public void addRelatedEntryFields(Document document, Object obj) throws Exception {
    if (obj instanceof DLFileEntry) {
        DLFileEntry dlFileEntry = (DLFileEntry) obj;
        Album album = AlbumLocalServiceUtil.getAlbum(GetterUtil.getLong(dlFileEntry.getTitle()));
        document.addKeyword(Field.CLASS_NAME_ID, PortalUtil.getClassNameId(Album.class.getName()));
        document.addKeyword(Field.CLASS_PK, album.getAlbumId());
        document.addKeyword(Field.RELATED_ENTRY, true);
    }
}
Also used : DLFileEntry(com.liferay.document.library.kernel.model.DLFileEntry) Album(org.liferay.jukebox.model.Album)

Aggregations

DLFileEntry (com.liferay.document.library.kernel.model.DLFileEntry)1 Album (org.liferay.jukebox.model.Album)1