br.com.objectos.way.sql.SimpleSelectWhere3Int Maven / Gradle / Ivy
package br.com.objectos.way.sql;
import br.com.objectos.way.db.Condition;
import br.com.objectos.way.db.IntTypeColumn;
import br.com.objectos.way.db.Selectable;
import br.com.objectos.way.db.Variable;
import java.util.Objects;
import javax.annotation.Generated;
@Generated("br.com.objectos.way.sql.BootProcessor")
public final class SimpleSelectWhere3Int extends AbstractSimpleSelectWhere3 implements SimpleSelectWhereInt, V> {
final Keyword keyword;
private final V first;
SimpleSelectWhere3Int(SelectNode> previous, Keyword keyword, V first) {
super(previous);
this.keyword = keyword;
this.first = first;
}
@Override
public SimpleSelectWhere3 eq(int value) {
return comparison(NumericComparison.EQ, value);
}
@Override
public SimpleSelectWhere3 eq(IntTypeColumn column) {
return comparison(NumericComparison.EQ, column);
}
@Override
public Object eq(Variable variable) {
throw new UnsupportedOperationException();
}
@Override
public Object gt() {
throw new UnsupportedOperationException();
}
@Override
public SimpleSelectWhere3 gt(int value) {
return comparison(NumericComparison.GT, value);
}
@Override
public SimpleSelectWhere3 gt(IntTypeColumn column) {
return comparison(NumericComparison.GT, column);
}
@Override
public Object gt(Variable variable) {
throw new UnsupportedOperationException();
}
@Override
Condition condition() {
return NumericComparison.EQ.ofColumn(first);
}
private SimpleSelectWhere3 comparison(NumericComparison operator, int value) {
Condition condition = operator.ofColumn(first.withValue(value));
return new SimpleSelectWhere3<>(this, condition);
}
private SimpleSelectWhere3 comparison(NumericComparison operator, IntTypeColumn column) {
Objects.requireNonNull(column);
Condition condition = operator.ofColumn(first, column);
return new SimpleSelectWhere3<>(this, condition);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy