Class ConstraintUtils

    • Method Detail

      • objectToTimeMillis

        public static Long objectToTimeMillis​(Object object)
        Supports Date, Calendar, Number and String formatted as YYYY-MM-DD
        Parameters:
        object - Any object
        Returns:
        a date represented as number of milliseconds since january 1 1970 if the object is supported, null otherwise.
        Since:
        7.1
      • objectToBigDecimal

        public static BigDecimal objectToBigDecimal​(Object object)
        Supports any object which toString method return a numeric as String.
        Parameters:
        object - Any object
        Returns:
        a BigDecimal if the object represent a number, null otherwise.
        Since:
        7.1
      • objectToPostiveLong

        public static Long objectToPostiveLong​(Object object)
        Supports any object which toString method return a positive numeric as String.
        Parameters:
        object - Any object
        Returns:
        a positive long value (rounded if needed) if the object represent a positive numeric, null otherwise.
        Since:
        7.1