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());
}
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());
}
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());
}
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;
}
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();
}
Aggregations