Class PropertyTools

java.lang.Object
io.jmix.search.utils.PropertyTools

@Component("search_PropertyTools") public class PropertyTools extends Object
  • Field Details

  • Constructor Details

    • PropertyTools

      public PropertyTools(MetadataTools metadataTools)
  • Method Details

    • findPropertiesByPath

      public Map<String,MetaPropertyPath> findPropertiesByPath(MetaClass metaClass, String pathString)
      Finds properties of entity by provided path string. Path string supports wildcard '*'.
      Parameters:
      metaClass - entity metaclass
      pathString - path to property to find
      Returns:
      map with effective property path as a key and property itself as a value
    • findPropertiesByPath

      public Map<String,MetaPropertyPath> findPropertiesByPath(MetaClass metaClass, String pathString, boolean useDynamicAttributes)
      Finds properties of an entity by the provided path string. The path string can include wildcard '*' for pattern matching.
      Parameters:
      metaClass - the entity's MetaClass to search within
      pathString - the path to the property to find, supports dot-separated notation and wildcards. The path string can also contain the '+' sign that determines a dynamic attribute.
      useDynamicAttributes - whether to include dynamic attributes in the search
      Returns:
      a map where the key is the effective property path as a string, and the value is the corresponding MetaPropertyPath object
    • findPropertiesByWildcardPath

      protected Map<String,MetaPropertyPath> findPropertiesByWildcardPath(MetaClass metaClass, String path)
    • findPropertiesByPathItems

      protected Map<String,MetaPropertyPath> findPropertiesByPathItems(MetaClass metaClass, String[] pathItems, MetaPropertyPath parentPath)
    • createPropertyPath

      protected MetaPropertyPath createPropertyPath(MetaPropertyPath parentPath, MetaProperty property)
    • findLocalPropertiesByPattern

      protected List<MetaProperty> findLocalPropertiesByPattern(MetaClass metaClass, Pattern pattern)
    • isPersistentPropertyPath

      protected boolean isPersistentPropertyPath(MetaPropertyPath propertyPath)
    • isPersistentProperty

      protected boolean isPersistentProperty(MetaProperty property)
    • isPropertySuitableToWildcardDeclaration

      protected boolean isPropertySuitableToWildcardDeclaration(MetaProperty property)
    • isPropertyPathSuitableToDirectDeclaration

      protected boolean isPropertyPathSuitableToDirectDeclaration(MetaPropertyPath propertyPath)
    • isPropertySuitableToDirectDeclaration

      protected boolean isPropertySuitableToDirectDeclaration(MetaProperty property)
    • isReferenceProperty

      protected boolean isReferenceProperty(MetaProperty property)
    • isSystemProperty

      protected boolean isSystemProperty(MetaProperty property)
    • isSystemLevelProperty

      protected boolean isSystemLevelProperty(MetaProperty property)
    • isSecretProperty

      protected boolean isSecretProperty(MetaProperty property)
    • hasWildcard

      protected boolean hasWildcard(String path)
    • isInverseProperty

      protected boolean isInverseProperty(MetaProperty propertyToCheck, MetaPropertyPath parentPath)