br.com.objectos.way.sql.SimpleSelectWhere13Int 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 SimpleSelectWhere13Int extends AbstractSimpleSelectWhere13 implements SimpleSelectWhereInt, V> {
final Keyword keyword;
private final V first;
SimpleSelectWhere13Int(SelectNode> previous, Keyword keyword, V first) {
super(previous);
this.keyword = keyword;
this.first = first;
}
@Override
public SimpleSelectWhere13 eq(int value) {
return comparison(NumericComparison.EQ, value);
}
@Override
public SimpleSelectWhere13 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 SimpleSelectWhere13 gt(int value) {
return comparison(NumericComparison.GT, value);
}
@Override
public SimpleSelectWhere13 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 SimpleSelectWhere13 comparison(NumericComparison operator, int value) {
Condition condition = operator.ofColumn(first.withValue(value));
return new SimpleSelectWhere13<>(this, condition);
}
private SimpleSelectWhere13 comparison(NumericComparison operator, IntTypeColumn column) {
Objects.requireNonNull(column);
Condition condition = operator.ofColumn(first, column);
return new SimpleSelectWhere13<>(this, condition);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy