Search in sources :

Example 1 with ArtistActionableDynamicQuery

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

the class ArtistIndexer method reindexEntries.

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

        @Override
        protected void addCriteria(DynamicQuery dynamicQuery) {
        }

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

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 Artist (org.liferay.jukebox.model.Artist)1 ArtistActionableDynamicQuery (org.liferay.jukebox.service.persistence.ArtistActionableDynamicQuery)1