All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.babyfish.jimmer.sql.ast.impl.ParameterUtils Maven / Gradle / Ivy

There is a newer version: 0.9.19
Show newest version
package org.babyfish.jimmer.sql.ast.impl;

class ParameterUtils {

    static  T validate(String predicateName, String parameterName, T parameter) {
        if (parameter == null) {
            throw new NullPointerException(
                    "The predicate \"" +
                            predicateName +
                            "\" cannot accept a null parameter \"" +
                            parameterName +
                            "\", this is to ensure that the current predicate can be created to avoid bugs; " +
                            "if you are sure you expect to ignore the creation of the current predicate " +
                            "when the parameter is null in order to achieve the purpose of dynamic query, " +
                            "please use \"" +
                            predicateName +
                            "If\""
            );
        }
        return parameter;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy