Search in sources :

Example 1 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class ClubPersistenceTest method testActionableDynamicQuery.

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();
    ActionableDynamicQuery actionableDynamicQuery = ClubLocalServiceUtil.getActionableDynamicQuery();
    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Club>() {

        @Override
        public void performAction(Club club) {
            Assert.assertNotNull(club);
            count.increment();
        }
    });
    actionableDynamicQuery.performActions();
    Assert.assertEquals(count.getValue(), _persistence.countAll());
}
Also used : Club(com.liferay.roster.model.Club) IntegerWrapper(com.liferay.portal.kernel.util.IntegerWrapper) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) Test(org.junit.Test)

Example 2 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class RosterMemberPersistenceTest method testActionableDynamicQuery.

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();
    ActionableDynamicQuery actionableDynamicQuery = RosterMemberLocalServiceUtil.getActionableDynamicQuery();
    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<RosterMember>() {

        @Override
        public void performAction(RosterMember rosterMember) {
            Assert.assertNotNull(rosterMember);
            count.increment();
        }
    });
    actionableDynamicQuery.performActions();
    Assert.assertEquals(count.getValue(), _persistence.countAll());
}
Also used : RosterMember(com.liferay.roster.model.RosterMember) IntegerWrapper(com.liferay.portal.kernel.util.IntegerWrapper) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) Test(org.junit.Test)

Example 3 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class RosterPersistenceTest method testActionableDynamicQuery.

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();
    ActionableDynamicQuery actionableDynamicQuery = RosterLocalServiceUtil.getActionableDynamicQuery();
    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Roster>() {

        @Override
        public void performAction(Roster roster) {
            Assert.assertNotNull(roster);
            count.increment();
        }
    });
    actionableDynamicQuery.performActions();
    Assert.assertEquals(count.getValue(), _persistence.countAll());
}
Also used : Roster(com.liferay.roster.model.Roster) IntegerWrapper(com.liferay.portal.kernel.util.IntegerWrapper) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) Test(org.junit.Test)

Example 4 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class RosterLocalServiceBaseImpl method getActionableDynamicQuery.

@Override
public ActionableDynamicQuery getActionableDynamicQuery() {
    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
    actionableDynamicQuery.setBaseLocalService(com.liferay.roster.service.RosterLocalServiceUtil.getService());
    actionableDynamicQuery.setClassLoader(getClassLoader());
    actionableDynamicQuery.setModelClass(Roster.class);
    actionableDynamicQuery.setPrimaryKeyPropertyName("rosterId");
    return actionableDynamicQuery;
}
Also used : DefaultActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery) DefaultActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery) IndexableActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Example 5 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class AdminPortletDataHandler method doPrepareManifestSummary.

@Override
protected void doPrepareManifestSummary(PortletDataContext portletDataContext, PortletPreferences portletPreferences) throws Exception {
    ActionableDynamicQuery kbArticleActionableDynamicQuery = new KBArticleExportActionableDynamicQuery(portletDataContext);
    kbArticleActionableDynamicQuery.performCount();
    ActionableDynamicQuery kbTemplateActionableDynamicQuery = new KBTemplateExportActionableDynamicQuery(portletDataContext);
    kbTemplateActionableDynamicQuery.performCount();
    ActionableDynamicQuery kbCommentActionableDynamicQuery = getKBCommentActionableDynamicQuery(portletDataContext);
    kbCommentActionableDynamicQuery.performCount();
}
Also used : KBTemplateExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery) KBArticleExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery) KBTemplateExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery) KBArticleExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery) KBCommentExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBCommentExportActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Aggregations

ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)21 DefaultActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery)6 IndexableActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery)6 DynamicQuery (com.liferay.portal.kernel.dao.orm.DynamicQuery)4 Document (com.liferay.portal.kernel.search.Document)4 IntegerWrapper (com.liferay.portal.kernel.util.IntegerWrapper)4 Test (org.junit.Test)4 KBArticleExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery)3 KBCommentExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBCommentExportActionableDynamicQuery)3 KBTemplateExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery)3 Element (com.liferay.portal.kernel.xml.Element)3 ArrayList (java.util.ArrayList)3 GadgetExportActionableDynamicQuery (com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery)2 AlbumExportActionableDynamicQuery (org.liferay.jukebox.service.persistence.AlbumExportActionableDynamicQuery)2 ArtistExportActionableDynamicQuery (org.liferay.jukebox.service.persistence.ArtistExportActionableDynamicQuery)2 Foo (com.liferay.blade.samples.servicebuilder.model.Foo)1 KBArticle (com.liferay.knowledgebase.model.KBArticle)1 KBArticleActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBArticleActionableDynamicQuery)1 KBArticleVersionComparator (com.liferay.knowledgebase.util.comparator.KBArticleVersionComparator)1 ExportActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery)1