Search in sources :

Example 1 with SongActionableDynamicQuery

use of org.liferay.jukebox.service.persistence.SongActionableDynamicQuery in project liferay-ide by liferay.

the class SongIndexer method reindexEntries.

protected void reindexEntries(long companyId) throws PortalException, SystemException {
    final Collection<Document> documents = new ArrayList<Document>();
    ActionableDynamicQuery actionableDynamicQuery = new SongActionableDynamicQuery() {

        @Override
        protected void addCriteria(DynamicQuery dynamicQuery) {
        }

        @Override
        protected void performAction(Object object) throws PortalException {
            Song song = (Song) object;
            Document document = getDocument(song);
            documents.add(document);
        }
    };
    actionableDynamicQuery.setCompanyId(companyId);
    actionableDynamicQuery.performActions();
    SearchEngineUtil.updateDocuments(getSearchEngineId(), companyId, documents);
}
Also used : SongActionableDynamicQuery(org.liferay.jukebox.service.persistence.SongActionableDynamicQuery) Song(org.liferay.jukebox.model.Song) DynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery) SongActionableDynamicQuery(org.liferay.jukebox.service.persistence.SongActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) ArrayList(java.util.ArrayList) Document(com.liferay.portal.kernel.search.Document) SongActionableDynamicQuery(org.liferay.jukebox.service.persistence.SongActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Aggregations

ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)1 DynamicQuery (com.liferay.portal.kernel.dao.orm.DynamicQuery)1 Document (com.liferay.portal.kernel.search.Document)1 ArrayList (java.util.ArrayList)1 Song (org.liferay.jukebox.model.Song)1 SongActionableDynamicQuery (org.liferay.jukebox.service.persistence.SongActionableDynamicQuery)1