@Test @DatabaseSetup(value = "classpath:dbunit/widgets_bundle.xml", type= DatabaseOperation.DELETE_ALL) public void testFindSystemWidgetsBundles() { createSystemWidgetBundles(30, "WB_"); assertEquals(30, widgetsBundleDao.find().size()); TextPageLink textPageLink1 = new TextPageLink(10, "WB"); List<WidgetsBundle> widgetsBundles1 = widgetsBundleDao.findSystemWidgetsBundles(textPageLink1); assertEquals(10, widgetsBundles1.size()); TextPageLink textPageLink2 = new TextPageLink(10, "WB", widgetsBundles1.get(9).getId().getId(), null); List<WidgetsBundle> widgetsBundles2 = widgetsBundleDao.findSystemWidgetsBundles(textPageLink2); assertEquals(10, widgetsBundles2.size()); }
@Override public List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink) { return DaoUtil.convertDataList( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID_STR, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink) { return DaoUtil.convertDataList( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID_STR, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); } }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink) { return DaoUtil.convertDataList( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID_STR, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); }  }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink) { return DaoUtil.convertDataList( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID_STR, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); }  @Override WidgetsBundle findWidgetsBundleByTenantIdAndAlias(UUID tenantId, String alias); @Override List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink); @Override List<WidgetsBundle> findTenantWidgetsBundlesByTenantId(UUID tenantId, TextPageLink pageLink); @Override List<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, TextPageLink pageLink); }
JpaWidgetsBundleDao extends JpaAbstractSearchTextDao<WidgetsBundleEntity, WidgetsBundle> implements WidgetsBundleDao { @Override public List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink) { return DaoUtil.convertDataList( widgetsBundleRepository .findSystemWidgetsBundles( NULL_UUID_STR, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); }  @Override WidgetsBundle findWidgetsBundleByTenantIdAndAlias(UUID tenantId, String alias); @Override List<WidgetsBundle> findSystemWidgetsBundles(TextPageLink pageLink); @Override List<WidgetsBundle> findTenantWidgetsBundlesByTenantId(UUID tenantId, TextPageLink pageLink); @Override List<WidgetsBundle> findAllTenantWidgetsBundlesByTenantId(UUID tenantId, TextPageLink pageLink);  }