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

com.jaregu.database.queries.compiling.expr.ConstantBaseImpl Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.4.1
Show newest version
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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy