Enum CriteriaType

    • Method Detail

      • values

        public static CriteriaType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CriteriaType c : CriteriaType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CriteriaType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getSqlKeyword

        public String getSqlKeyword()
        To get sql keyword
        Returns:
        String
      • isPartTypeUnSupported

        public static boolean isPartTypeUnSupported​(@NonNull
                                                    org.springframework.data.repository.query.parser.Part.Type partType)
        Check if PartType is NOT supported.
        Parameters:
        partType - PartType to be checked.
        Returns:
        True if unsupported, or false.
      • isPartTypeSupported

        public static boolean isPartTypeSupported​(@NonNull
                                                  org.springframework.data.repository.query.parser.Part.Type partType)
        Check if PartType is supported.
        Parameters:
        partType - PartType to be checked.
        Returns:
        True if supported, or false.
      • toCriteriaType

        public static CriteriaType toCriteriaType​(@NonNull
                                                  org.springframework.data.repository.query.parser.Part.Type partType)
        Convert to criteria type.
        Parameters:
        partType - PartType to be converted.
        Returns:
        CriteriaType
        Throws:
        UnsupportedOperationException - for unsupported part type
      • isClosed

        public static boolean isClosed​(CriteriaType type)
        Check if CriteriaType operation is closure, with format of (A ops A -> A). Example: AND, OR.
        Parameters:
        type - CriteriaType operation
        Returns:
        True if match, or false.
      • isBinary

        public static boolean isBinary​(CriteriaType type)
        Check if CriteriaType operation is binary, with format of (A ops A -> B). Example: IS_EQUAL, AFTER.
        Parameters:
        type - CriteriaType operation
        Returns:
        True if match, or false.
      • isFunction

        public static boolean isFunction​(CriteriaType type)
        Check if CriteriaType operation is a function.
        Parameters:
        type - CriteriaType
        Returns:
        True if match, or false.
      • isUnary

        public static boolean isUnary​(CriteriaType type)
        Check if CriteriaType operation is unary, with format of (ops A -> B).
        Parameters:
        type - CriteriaType
        Returns:
        True if match, or false.