@Test @DatabaseSetup("classpath:dbunit/empty_dataset.xml") @DatabaseTearDown(value = "classpath:dbunit/empty_dataset.xml", type= DatabaseOperation.DELETE_ALL) public void testSearchTextNotFound() { UUID tenantId = Uuids.timeBased(); createWidgetBundles(5, tenantId, "ABC_"); createSystemWidgetBundles(5, "SYS_"); PageLink textPageLink = new PageLink(30, 0, "TEXT_NOT_FOUND"); PageData<WidgetsBundle> widgetsBundles4 = widgetsBundleDao.findAllTenantWidgetsBundlesByTenantId(tenantId, textPageLink); assertEquals(0, widgetsBundles4.getData().size()); }
@Override public PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findAllTenantWidgetsBundlesByTenantId( tenantId, NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findAllTenantWidgetsBundlesByTenantId( tenantId, NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); } }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findAllTenantWidgetsBundlesByTenantId( tenantId, NULL_UUID, Objects.toString(pageLink.getTextSearch(), ""), DaoUtil.toPageable(pageLink))); }  }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public PageData<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findAllTenantWidgetsBundlesByTenantId( tenantId, 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> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.toPageData( widgetsBundleRepository .findAllTenantWidgetsBundlesByTenantId( tenantId, 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);  }