Class PropertyFilterSupport

java.lang.Object
io.jmix.ui.component.propertyfilter.PropertyFilterSupport
Direct Known Subclasses:
DynAttrPropertyFilterSupport

@Component("ui_PropertyFilterSupport") public class PropertyFilterSupport extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getOperationCaption

      public String getOperationCaption(PropertyFilter.Operation operation)
    • getPropertyFilterPrefix

      public String getPropertyFilterPrefix(@Nullable String id, String property)
      Returns the prefix for id of PropertyFilter. This prefix used for internal PropertyFilter components.
      Parameters:
      id - an id of property filter
      property - a property
      Returns:
      a prefix
    • getPropertyFilterCaption

      public String getPropertyFilterCaption(MetaClass metaClass, String property, PropertyFilter.Operation operation, boolean operationCaptionVisible)
      Returns default caption for PropertyFilter.

      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 filter
      property - an entity attribute associated with property filter
      operation - operation for which to show caption
      operationCaptionVisible - whether to show operation caption
    • getPropertyFilterCaption

      public String getPropertyFilterCaption(MetaClass metaClass, String property)
      Returns default caption for PropertyFilter.
      Parameters:
      metaClass - an entity meta class associated with property filter
      property - an entity attribute associated with property filter
    • getAvailableOperations

      public EnumSet<PropertyFilter.Operation> getAvailableOperations(MetaPropertyPath mpp)
    • getAvailableOperations

      public EnumSet<PropertyFilter.Operation> getAvailableOperations(MetaClass metaClass, String property)
    • getDefaultOperation

      public PropertyFilter.Operation getDefaultOperation(MetaClass metaClass, String property)
    • isStringDatatype

      protected boolean isStringDatatype(MetaPropertyPath mpp)
    • toPropertyConditionOperation

      public String toPropertyConditionOperation(PropertyFilter.Operation operation)
    • 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 filter
      operationType - an operation type
      value - a default value
      Returns:
      string default value
    • formatSingleDefaultValue

      @Nullable protected String formatSingleDefaultValue(Range range, Object value)
    • 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 filter
      operationType - an operation type
      value - a string default value
      Returns:
      default value
    • parseSingleDefaultValue

      @Nullable protected Object parseSingleDefaultValue(Range range, String value)