Search in sources :

Example 1 with IntegerWrapper

use of com.liferay.portal.kernel.util.IntegerWrapper 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 IntegerWrapper

use of com.liferay.portal.kernel.util.IntegerWrapper 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 IntegerWrapper

use of com.liferay.portal.kernel.util.IntegerWrapper 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 IntegerWrapper

use of com.liferay.portal.kernel.util.IntegerWrapper in project liferay-blade-samples by liferay.

the class FooPersistenceTest method testActionableDynamicQuery.

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

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

Aggregations

ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)4 IntegerWrapper (com.liferay.portal.kernel.util.IntegerWrapper)4 Test (org.junit.Test)4 Foo (com.liferay.blade.samples.servicebuilder.model.Foo)1 Club (com.liferay.roster.model.Club)1 Roster (com.liferay.roster.model.Roster)1 RosterMember (com.liferay.roster.model.RosterMember)1