com.jn.sqlhelper.dialect.SelectRequest Maven / Gradle / Ivy
package com.jn.sqlhelper.dialect;
import com.jn.langx.util.Objects;
import com.jn.sqlhelper.dialect.orderby.OrderBy;
public class SelectRequest> extends SqlRequest {
private OrderBy orderBy;
private int timeout;
public String getOrderByAsString() {
return Objects.isNull(this.orderBy) ? "" : this.orderBy.toString();
}
public OrderBy getOrderBy() {
return orderBy;
}
public SelectRequest setOrderBy(OrderBy orderBy) {
this.orderBy = orderBy;
return this;
}
public boolean needOrderBy() {
if (this.orderBy == null || !this.orderBy.isValid()) {
return false;
}
return true;
}
public int getTimeout() {
return this.timeout;
}
public SelectRequest setTimeout(int timeout) {
this.timeout = timeout;
return this;
}
}