Package io.jmix.groupgridflowui.data
Class BaseGroupPropertyDescriptor<E>
java.lang.Object
io.jmix.groupgridflowui.data.BaseGroupPropertyDescriptor<E>
- Type Parameters:
E- item type
- All Implemented Interfaces:
GroupPropertyDescriptor<E>
Base implementation of
GroupPropertyDescriptor.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.component.groupgrid.data.GroupPropertyDescriptor
GroupPropertyDescriptor.GroupValueContext<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GroupPropertyprotected Function<GroupPropertyDescriptor.GroupValueContext<E>,Object> -
Constructor Summary
ConstructorsConstructorDescriptionBaseGroupPropertyDescriptor(GroupProperty property, Function<GroupPropertyDescriptor.GroupValueContext<E>, Object> valueProvider) Creates a new instance ofBaseGroupPropertyDescriptor.BaseGroupPropertyDescriptor(String propertyName, Function<GroupPropertyDescriptor.GroupValueContext<E>, Object> valueProvider) Creates a new instance ofBaseGroupPropertyDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionwithSortProperties(List<String> sortProperties) Sets the list of properties that are used to sort items if the group property is used for sorting.
-
Field Details
-
property
-
valueProvider
-
sortProperties
-
-
Constructor Details
-
BaseGroupPropertyDescriptor
public BaseGroupPropertyDescriptor(String propertyName, Function<GroupPropertyDescriptor.GroupValueContext<E>, Object> valueProvider) Creates a new instance ofBaseGroupPropertyDescriptor.- Parameters:
propertyName- name of the property that is used to group itemsvalueProvider- function that provides a value for the property
-
BaseGroupPropertyDescriptor
public BaseGroupPropertyDescriptor(GroupProperty property, Function<GroupPropertyDescriptor.GroupValueContext<E>, Object> valueProvider) Creates a new instance ofBaseGroupPropertyDescriptor.- Parameters:
property- property that is used to group itemsvalueProvider- function that provides a value for the property
-
-
Method Details
-
getProperty
- Specified by:
getPropertyin interfaceGroupPropertyDescriptor<E>- Returns:
- the property to be used for grouping
-
getValueProvider
- Specified by:
getValueProviderin interfaceGroupPropertyDescriptor<E>- Returns:
- a function that provides the value of the custom property for the given item
-
withSortProperties
Sets the list of properties that are used to sort items if the group property is used for sorting.- Parameters:
sortProperties- list of entity properties- Returns:
- current instance
-
getSortProperties
- Specified by:
getSortPropertiesin interfaceGroupPropertyDescriptor<E>- Returns:
- a list of properties that should be used for sorting the group property
-