@Test @DatabaseSetup(value = "classpath:dbunit/widgets_bundle.xml", type= DatabaseOperation.DELETE_ALL) public void testFindSystemWidgetsBundles() { createSystemWidgetBundles(30, "WB_"); assertEquals(30, widgetsBundleDao.find(AbstractServiceTest.SYSTEM_TENANT_ID).size()); PageLink pageLink = new PageLink(10, 0, "WB"); PageData<WidgetsBundle> widgetsBundles1 = widgetsBundleDao.findSystemWidgetsBundles(AbstractServiceTest.SYSTEM_TENANT_ID, pageLink); assertEquals(10, widgetsBundles1.getData().size()); pageLink = pageLink.nextPageLink(); PageData<WidgetsBundle> widgetsBundles2 = widgetsBundleDao.findSystemWidgetsBundles(AbstractServiceTest.SYSTEM_TENANT_ID, pageLink); assertEquals(10, widgetsBundles2.getData().size()); }
@Override public PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); } }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }  }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }  @Override WidgetsBundle findWidgetsBundleByTenantIdAndAlias(UUID tenantId, String alias); @Override PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink); @Override PageData<WidgetsBundle> findTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink); @Override PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink); }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }  @Override WidgetsBundle findWidgetsBundleByTenantIdAndAlias(UUID tenantId, String alias); @Override PageData<WidgetsBundle> findSystemWidgetsBundles(TenantId tenantId, PageLink pageLink); @Override PageData<WidgetsBundle> findTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink); @Override PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink);  }