use of de.alpharogroup.collections.pairs.Quattro in project bundle-app-ui by astrapi69.
the class OverviewResourceBundleAddEntryPanel method reloadTableModelList.
private void reloadTableModelList() {
tableModelList = new ArrayList<>();
final ResourcebundlesService resourcebundlesService = SpringApplicationContext.getInstance().getResourcebundlesService();
BundleApplications bundleApplication = getModelObject().getBundleApplication();
final String baseName = getModelObject().getSelectedBundleName().getBaseName().getName();
final Locale locale = LocaleResolver.resolveLocale(getModelObject().getSelectedBundleName().getLocale().getLocale());
final List<Resourcebundles> list = resourcebundlesService.findResourceBundles(bundleApplication, baseName, locale);
for (final Resourcebundles resourcebundle : list) {
tableModelList.add(Quattro.<String, String, Resourcebundles, Resourcebundles>builder().topLeft(resourcebundle.getKey().getName()).topRight(resourcebundle.getValue()).bottomLeft(resourcebundle).bottomRight(resourcebundle).build());
}
Collections.sort(tableModelList, NullCheckComparator.<Quattro<String, String, Resourcebundles, Resourcebundles>>of((o1, o2) -> o1.getTopLeft().compareTo(o2.getTopLeft())));
}
Aggregations