org.mentabean.sql.functions.Nullif Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of menta-bean Show documentation
Show all versions of menta-bean Show documentation
An query helper and simple CRUD ORM.
package org.mentabean.sql.functions;
import org.mentabean.sql.Function;
import org.mentabean.sql.Parametrizable;
import org.mentabean.sql.param.Param;
import org.mentabean.sql.param.ParamValue;
public class Nullif extends Parametrizable implements Function {
private Param p1, p2;
public Nullif(Param p1, Param p2) {
this.p1 = p1;
this.p2 = p2;
}
public Nullif(Object p1, Object p2) {
this.p1 = new ParamValue(p1);
this.p2 = new ParamValue(p2);
}
@Override
public Param[] getParams() {
return new Param[] {p1, p2};
}
@Override
public String name() {
return "NULLIF";
}
}