org.babyfish.jimmer.sql.ast.impl.ParameterUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
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;
}
}