Package io.jmix.search.utils
Class PropertyTools
java.lang.Object
io.jmix.search.utils.PropertyTools
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MetaPropertyPathcreatePropertyPath(MetaPropertyPath parentPath, MetaProperty property) protected List<MetaProperty>findLocalPropertiesByPattern(MetaClass metaClass, Pattern pattern) findPropertiesByPath(MetaClass metaClass, String pathString) Finds properties of entity by provided path string.findPropertiesByPath(MetaClass metaClass, String pathString, boolean useDynamicAttributes) Finds properties of an entity by the provided path string.protected Map<String,MetaPropertyPath> findPropertiesByPathItems(MetaClass metaClass, String[] pathItems, MetaPropertyPath parentPath) protected Map<String,MetaPropertyPath> findPropertiesByWildcardPath(MetaClass metaClass, String path) protected booleanhasWildcard(String path) protected booleanisInverseProperty(MetaProperty propertyToCheck, MetaPropertyPath parentPath) protected booleanisPersistentProperty(MetaProperty property) protected booleanisPersistentPropertyPath(MetaPropertyPath propertyPath) protected booleanisPropertyPathSuitableToDirectDeclaration(MetaPropertyPath propertyPath) protected booleanprotected booleanprotected booleanisReferenceProperty(MetaProperty property) protected booleanisSecretProperty(MetaProperty property) protected booleanisSystemLevelProperty(MetaProperty property) protected booleanisSystemProperty(MetaProperty property)
-
Field Details
-
metadataTools
-
-
Constructor Details
-
PropertyTools
-
-
Method Details
-
findPropertiesByPath
Finds properties of entity by provided path string. Path string supports wildcard '*'.- Parameters:
metaClass- entity metaclasspathString- 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'sMetaClassto search withinpathString- 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
MetaPropertyPathobject
-
findPropertiesByWildcardPath
protected Map<String,MetaPropertyPath> findPropertiesByWildcardPath(MetaClass metaClass, String path) -
findPropertiesByPathItems
protected Map<String,MetaPropertyPath> findPropertiesByPathItems(MetaClass metaClass, String[] pathItems, MetaPropertyPath parentPath) -
createPropertyPath
-
findLocalPropertiesByPattern
-
isPersistentPropertyPath
-
isPersistentProperty
-
isPropertySuitableToWildcardDeclaration
-
isPropertyPathSuitableToDirectDeclaration
-
isPropertySuitableToDirectDeclaration
-
isReferenceProperty
-
isSystemProperty
-
isSystemLevelProperty
-
isSecretProperty
-
hasWildcard
-
isInverseProperty
-