Class PropertyFilterSupport
java.lang.Object
io.jmix.flowui.component.propertyfilter.PropertyFilterSupport
- Direct Known Subclasses:
DynAttrPropertyFilterSupport
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected DatatypeRegistry
protected Messages
protected MessageTools
protected MetadataTools
-
Constructor Summary
ConstructorDescriptionPropertyFilterSupport
(Messages messages, MessageTools messageTools, MetadataTools metadataTools, DataManager dataManager, DatatypeRegistry datatypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionformatDefaultValue
(MetaProperty metaProperty, PropertyFilter.Operation.Type operationType, Object value) Converts default value of value component to Stringprotected String
formatSingleDefaultValue
(Range range, Object value) getAvailableOperations
(MetaClass metaClass, String property) getDefaultOperation
(MetaClass metaClass, String property) getOperationText
(PropertyFilter.Operation operation) getPropertyFilterCaption
(MetaClass metaClass, String property) Returns default caption forPropertyFilter
.getPropertyFilterCaption
(MetaClass metaClass, String property, PropertyFilter.Operation operation, boolean operationCaptionVisible) Returns default caption forPropertyFilter
.getPropertyFilterPrefix
(Optional<String> id, String property) Returns the prefix for id ofPropertyFilter
.protected boolean
protected boolean
parseDefaultValue
(MetaProperty metaProperty, PropertyFilter.Operation.Type operationType, String value) Parses default value for value component from Stringprotected Object
parseSingleDefaultValue
(Range range, String value)
-
Field Details
-
dateTimeClasses
-
timeClasses
-
messages
-
messageTools
-
metadataTools
-
dataManager
-
datatypeRegistry
-
-
Constructor Details
-
PropertyFilterSupport
public PropertyFilterSupport(Messages messages, MessageTools messageTools, MetadataTools metadataTools, DataManager dataManager, DatatypeRegistry datatypeRegistry)
-
-
Method Details
-
getOperationText
-
getPropertyFilterPrefix
Returns the prefix for id ofPropertyFilter
. This prefix used for internalPropertyFilter
components.- Parameters:
id
- an id of property filterproperty
- a property- Returns:
- a prefix
-
getPropertyFilterCaption
public String getPropertyFilterCaption(MetaClass metaClass, String property, PropertyFilter.Operation operation, boolean operationCaptionVisible) Returns default caption forPropertyFilter
.Default caption consist of the related entity property caption and the operation caption (if the operation caption is configured to be visible), e.g. "Last name contains".
- Parameters:
metaClass
- an entity meta class associated with property filterproperty
- an entity attribute associated with property filteroperation
- operation for which to show captionoperationCaptionVisible
- whether to show operation caption
-
getPropertyFilterCaption
Returns default caption forPropertyFilter
.- Parameters:
metaClass
- an entity meta class associated with property filterproperty
- an entity attribute associated with property filter
-
getAvailableOperations
-
getAvailableOperations
public EnumSet<PropertyFilter.Operation> getAvailableOperations(MetaClass metaClass, String property) -
getDefaultOperation
-
isStringDatatype
-
isCollectionDatatype
-
toPropertyConditionOperation
-
formatDefaultValue
@Nullable public String formatDefaultValue(MetaProperty metaProperty, PropertyFilter.Operation.Type operationType, @Nullable Object value) Converts default value of value component to String- Parameters:
metaProperty
- an entity attribute associated with filteroperationType
- an operation typevalue
- a default value- Returns:
- string default value
-
formatSingleDefaultValue
-
parseDefaultValue
@Nullable public Object parseDefaultValue(MetaProperty metaProperty, PropertyFilter.Operation.Type operationType, @Nullable String value) Parses default value for value component from String- Parameters:
metaProperty
- an entity attribute associated with filteroperationType
- an operation typevalue
- a string default value- Returns:
- default value
-
parseSingleDefaultValue
-