com.jaregu.database.queries.compiling.expr.ConstantBaseImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of queries Show documentation
Show all versions of queries Show documentation
Java based SQL templating project. Store your queries in *.sql files and build queries for execution. Supports simple expressions and conditional clauses and interface proxying for java-sql bridge.
package com.jaregu.database.queries.compiling.expr;
import java.util.Objects;
public class ConstantBaseImpl extends OperandBaseImpl implements Constant {
final private T value;
protected ConstantBaseImpl(T value) {
this.value = value;
}
@Override
public T getValue() {
return value;
}
@Override
public boolean equal(Operand object) {
return Objects.equals(getValue(), object.getValue());
}
@Override
public boolean notEqual(Operand object) {
return !equal(object);
}
@Override
public String toString() {
return value == null ? "null" : value.toString();
}
}