Example usage for com.liferay.portal.kernel.util IntegerWrapper increment

List of usage examples for com.liferay.portal.kernel.util IntegerWrapper increment

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util IntegerWrapper increment.

Prototype

public int increment() 

Source Link

Usage

From source file:blade.servicebuilder.service.persistence.test.FooPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = FooLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Foo>() {
        @Override/*from  www .java  2 s  . com*/
        public void performAction(Foo foo) {
            Assert.assertNotNull(foo);

            count.increment();
        }
    });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:ch.inofix.referencemanager.service.persistence.test.ReferencePersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = ReferenceLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Reference>() {
        @Override//ww  w.  j ava2  s. co  m
        public void performAction(Reference reference) {
            Assert.assertNotNull(reference);

            count.increment();
        }
    });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.bemis.portal.customer.service.persistence.test.CustomerLocationPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = CustomerLocationLocalServiceUtil
            .getActionableDynamicQuery();

    actionableDynamicQuery/*from   w ww.  j ava2  s  .  co m*/
            .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<CustomerLocation>() {
                @Override
                public void performAction(CustomerLocation customerLocation) {
                    Assert.assertNotNull(customerLocation);

                    count.increment();
                }
            });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.bemis.portal.inventory.service.persistence.test.InventoryPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = InventoryLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Inventory>() {
        @Override/*from  www  .j  a  v a 2  s.  c om*/
        public void performAction(Inventory inventory) {
            Assert.assertNotNull(inventory);

            count.increment();
        }
    });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.bemis.portal.order.service.persistence.test.OrderPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = OrderLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Order>() {
        @Override//from   ww  w  .  j a v  a2 s  .  co m
        public void performAction(Order order) {
            Assert.assertNotNull(order);

            count.increment();
        }
    });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.bemis.portal.order.service.persistence.test.OrderRequestPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = OrderRequestLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery/*  w  w w.j av a  2  s.  c o  m*/
            .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<OrderRequest>() {
                @Override
                public void performAction(OrderRequest orderRequest) {
                    Assert.assertNotNull(orderRequest);

                    count.increment();
                }
            });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.bemis.portal.shipment.service.persistence.test.ShipmentPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = ShipmentLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Shipment>() {
        @Override//from   ww  w.j ava2s . c  o m
        public void performAction(Shipment shipment) {
            Assert.assertNotNull(shipment);

            count.increment();
        }
    });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.liferay.adaptive.media.image.service.persistence.test.AdaptiveMediaImageEntryPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = AdaptiveMediaImageEntryLocalServiceUtil
            .getActionableDynamicQuery();

    actionableDynamicQuery//ww w  . j  a  v  a2 s . co  m
            .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<AdaptiveMediaImageEntry>() {
                @Override
                public void performAction(AdaptiveMediaImageEntry adaptiveMediaImageEntry) {
                    Assert.assertNotNull(adaptiveMediaImageEntry);

                    count.increment();
                }
            });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.liferay.adaptive.media.image.service.persistence.test.AMImageEntryPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = AMImageEntryLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery// w  w w. j av  a2 s . c  o  m
            .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<AMImageEntry>() {
                @Override
                public void performAction(AMImageEntry amImageEntry) {
                    Assert.assertNotNull(amImageEntry);

                    count.increment();
                }
            });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}

From source file:com.liferay.asset.category.property.service.persistence.test.AssetCategoryPropertyPersistenceTest.java

License:Open Source License

@Test
public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery = AssetCategoryPropertyLocalServiceUtil
            .getActionableDynamicQuery();

    actionableDynamicQuery/*  ww w  .j a  v a  2 s. c  o m*/
            .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<AssetCategoryProperty>() {
                @Override
                public void performAction(AssetCategoryProperty assetCategoryProperty) {
                    Assert.assertNotNull(assetCategoryProperty);

                    count.increment();
                }
            });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
}