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

br.com.objectos.way.sql.SimpleSelectWhere20 Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
package br.com.objectos.way.sql;

import br.com.objectos.way.db.Condition;
import br.com.objectos.way.db.Dialect;
import br.com.objectos.way.db.IntTypeColumn;
import br.com.objectos.way.db.LocalDateTypeColumn;
import br.com.objectos.way.db.Order;
import br.com.objectos.way.db.Orderable;
import br.com.objectos.way.db.ParameterBinder;
import br.com.objectos.way.db.SelectBuilder;
import br.com.objectos.way.db.Selectable;
import br.com.objectos.way.db.StringTypeColumn;
import javax.annotation.Generated;

@Generated("br.com.objectos.way.sql.BootProcessor")
public final class SimpleSelectWhere20 extends SelectNode> implements SimpleSelectWhere> {
  private final Condition condition;

  SimpleSelectWhere20(SelectNode> previous, Condition condition) {
    super(previous);
    this.condition = condition;
  }

  @Override
  public  SimpleSelectWhere20Int and(X column) {
    return new SimpleSelectWhere20Int<>(this, Keyword.AND, column);
  }

  @Override
  public  SimpleSelectWhere20LocalDate and(X column) {
    return new SimpleSelectWhere20LocalDate<>(this, Keyword.AND, column);
  }

  @Override
  public  SimpleSelectWhere20String and(X column) {
    return new SimpleSelectWhere20String<>(this, Keyword.AND, column);
  }

  @Override
  public SimpleSelectQuery20 compile(Dialect dialect) {
    return new SimpleSelectQuery20<>(dialect, this);
  }

  @Override
  public SimpleSelectOrderBy20 orderBy(Orderable o1) {
    return orderBy(o1.asc());
  }

  @Override
  public SimpleSelectOrderBy20 orderBy(Order o1) {
    return orderBy0(o1);
  }

  @Override
  ParameterBinder bind0(ParameterBinder binder) {
    condition.bind(binder);
    return binder;
  }

  @Override
  SelectBuilder write0(SelectBuilder sql) {
    return sql.where(condition);
  }

  private SimpleSelectOrderBy20 orderBy0(Order... columns) {
    return new SimpleSelectOrderBy20<>(this, columns);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy