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

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

package br.com.objectos.way.sql;

import br.com.objectos.way.core.testing.Testables;
import com.google.common.base.Optional;
import java.util.List;

@javax.annotation.Generated("br.com.objectos.way.auto.pojo.AutoPojoProcessor")
final class ListSqlPojo extends ListSql  {

  private final List selectableList;
  private final TableReference tableReference;
  private final Optional whereCondition;
  private final Optional groupByInfo;
  private final Optional havingCondition;
  private final Optional orderByInfo;

  public ListSqlPojo(ListSqlBuilderPojo builder) {
    super();
    selectableList = builder.selectableList();
    tableReference = builder.tableReference();
    whereCondition = builder.whereCondition();
    groupByInfo = builder.groupByInfo();
    havingCondition = builder.havingCondition();
    orderByInfo = builder.orderByInfo();
  }

  @Override
  public boolean isEqual(Sql o) {
    if (!ListSqlPojo.class.isInstance(o)) {
      return false;
    }    
    ListSqlPojo that = ListSqlPojo.class.cast(o);
    return Testables.isEqualHelper()
        .equal(this.selectableList, that.selectableList)
        .equal(this.tableReference, that.tableReference)
        .equal(this.whereCondition, that.whereCondition)
        .equal(this.groupByInfo, that.groupByInfo)
        .equal(this.havingCondition, that.havingCondition)
        .equal(this.orderByInfo, that.orderByInfo)
        .result();
  }
  
  @Override
  List selectableList() {
    return selectableList;
  }
  
  @Override
  TableReference tableReference() {
    return tableReference;
  }
  
  @Override
  Optional whereCondition() {
    return whereCondition;
  }
  
  @Override
  Optional groupByInfo() {
    return groupByInfo;
  }
  
  @Override
  Optional havingCondition() {
    return havingCondition;
  }
  
  @Override
  Optional orderByInfo() {
    return orderByInfo;
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy