コード例 #1
0
  @Test
  public void testActionableDynamicQuery() throws Exception {
    final IntegerWrapper count = new IntegerWrapper();

    ActionableDynamicQuery actionableDynamicQuery =
        ExpandoRowLocalServiceUtil.getActionableDynamicQuery();

    actionableDynamicQuery.setPerformActionMethod(
        new ActionableDynamicQuery.PerformActionMethod() {
          @Override
          public void performAction(Object object) {
            ExpandoRow expandoRow = (ExpandoRow) object;

            Assert.assertNotNull(expandoRow);

            count.increment();
          }
        });

    actionableDynamicQuery.performActions();

    Assert.assertEquals(count.getValue(), _persistence.countAll());
  }
コード例 #2
0
ファイル: WebFormUtil.java プロジェクト: acs/liferay-plugins
  public static int getTableRowsCount(long companyId, String tableName) throws SystemException {

    return ExpandoRowLocalServiceUtil.getRowsCount(
        companyId, WebFormUtil.class.getName(), tableName);
  }