Class PropertyHelper


  • public class PropertyHelper
    extends Object
    • Constructor Detail

      • PropertyHelper

        public PropertyHelper()
    • Method Detail

      • contains

        public static boolean contains​(Object property,
                                       Object... properties)
        Returns whether the given property is contained in the given properties list. Actually, string representations are matched
      • containsName

        public static boolean containsName​(String name,
                                           Property<?,​?>... properties)
        Returns whether any of the given properties has the given name
      • getGetter

        public static Method getGetter​(Class<?> clazz,
                                       String name)
        Returns the getter for the given property on the given class
      • getGetterName

        public static String getGetterName​(com.querydsl.core.types.Path<?> path)
        Returns the gettern name for the given property path
      • getGetterNames

        public static List<String> getGetterNames​(com.querydsl.core.types.Path<?>... paths)
        Returns the getter names for all the given paths
      • getPropertyName

        public static String getPropertyName​(Method method)
        Returns the property name of the given method, or throws an IllegalArgumentException if the method is not a getter or setter
      • getPropertyName

        public static String getPropertyName​(Object object)
        Returns the property name from a bean property. Handles bean properties (Property), Querydsl paths ( Path), methods and strings
      • getPropertyName

        public static String getPropertyName​(com.querydsl.core.types.Path<?> path)
        Returns the property name from a Querydsl path
      • isSecretProperty

        public static boolean isSecretProperty​(String property)
        Indicates whether the given property name should be considered secret / sensitive / private.