Class Assert


  • public final class Assert
    extends Object
    Provides various assertions for Morphia during validation
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • raiseError

        public static void raiseError​(String error)
        Throws an QueryException with the given error message.
        Parameters:
        error - the error message
      • parametersNotNull

        public static void parametersNotNull​(String names,
                                             Object... objects)
        Validates that all the parameters are not null
        Parameters:
        names - a comma separated String of parameter names
        objects - the proposed parameter values
      • parameterNotEmpty

        public static void parameterNotEmpty​(String name,
                                             Iterable obj)
        Validates that the Iterable is not empty
        Parameters:
        name - the parameter name
        obj - the proposed parameter value
      • parameterNotEmpty

        public static void parameterNotEmpty​(String name,
                                             String value)
        Validates that the value is not empty
        Parameters:
        name - the parameter name
        value - the proposed parameter value