use of sirius.kernel.commons.Strings in project sirius-biz by scireum.
the class SearchableEntity method updateSearchField.
@BeforeSave
protected void updateSearchField() {
if (!isNew() && !isAnyMappingChanged()) {
return;
}
BasicIndexTokenizer tokenizer = new BasicIndexTokenizer();
StringBuilder contentBuilder = new StringBuilder();
this.getDescriptor().getProperties().stream().filter(p -> p.getAnnotation(SearchContent.class).isPresent()).map(p -> p.getValue(this)).filter(Strings::isFilled).forEach(obj -> addContent(tokenizer, contentBuilder, obj));
searchField = contentBuilder.toString();
}
Aggregations