Package io.jmix.flowui.component.factory
Class ItemsFetchCallbackSupport
java.lang.Object
io.jmix.flowui.component.factory.ItemsFetchCallbackSupport
@Component("flowui_ItemsFetchCallbackSupport")
public class ItemsFetchCallbackSupport
extends Object
Creates items fetch callbacks that load entities or scalar values through
DataManager
with offset/limit paging, either from a JPQL query with a :searchString parameter or
from a Condition built for each search string.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DataManagerprotected final MetadataToolsprotected static final Stringprotected final StringSubstitutorprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionItemsFetchCallbackSupport(DataManager dataManager, StringSubstitutor stringSubstitutor, MetadataTools metadataTools) -
Method Summary
Modifier and TypeMethodDescriptionbuildInstanceNameCondition(List<String> searchProperties, String searchString) Builds a case-insensitive substring-match condition over the given search properties, combined with "or" if there are several.createEntityFetchCallback(Class<E> entityClass, String queryString, @Nullable String searchStringFormat, boolean escapeValueForLike, @Nullable FetchPlan fetchPlan) createEntityFetchCallback(Class<E> entityClass, Function<String, Condition> conditionBuilder, @Nullable Sort sort, @Nullable FetchPlan fetchPlan) createValuesFetchCallback(String queryString, @Nullable String searchStringFormat, boolean escapeValueForLike) getInstanceNameSortOrders(MetaClass metaClass) Returns ascending sort orders over the non-class instance-name-related properties.protected StringgetSearchString(com.vaadin.flow.data.provider.Query<?, String> query, @Nullable String searchStringFormat, boolean escapeValue) resolveInstanceNameSearchProperties(MetaClass metaClass) Returns names of string-typed instance-name-related properties of the given metaClass, used as the search properties for a byInstanceName condition.
-
Field Details
-
VALUE_PARAMETER
- See Also:
-
SEARCH_STRING_PARAMETER
- See Also:
-
dataManager
-
stringSubstitutor
-
metadataTools
-
-
Constructor Details
-
ItemsFetchCallbackSupport
public ItemsFetchCallbackSupport(DataManager dataManager, StringSubstitutor stringSubstitutor, MetadataTools metadataTools)
-
-
Method Details
-
createEntityFetchCallback
-
createEntityFetchCallback
-
createValuesFetchCallback
public SupportsItemsFetchCallback.FetchCallback<Object,String> createValuesFetchCallback(String queryString, @Nullable String searchStringFormat, boolean escapeValueForLike) -
getSearchString
-
resolveInstanceNameSearchProperties
Returns names of string-typed instance-name-related properties of the given metaClass, used as the search properties for a byInstanceName condition. -
buildInstanceNameCondition
Builds a case-insensitive substring-match condition over the given search properties, combined with "or" if there are several. -
getInstanceNameSortOrders
Returns ascending sort orders over the non-class instance-name-related properties.
-