package net.northking.cctp.common.http;

/**
 * SQL查询排序
 *
 * @author xiusong.xie
 * @since 1.0
 */
public class QueryOrderBy
{
  private String column;
  private String dir;

  public QueryOrderBy(String column, String dir)
  {
    this.column = column;
    this.dir = dir;
  }

  public QueryOrderBy()
  {
  }

  public QueryOrderBy asc(String column)
  {
    this.column = column;
    this.dir = "ASC";
    return this;
  }

  public QueryOrderBy desc(String column)
  {
    this.column = column;
    this.dir = "DESC";
    return this;
  }

  /**
   * 获取 column
   *
   * @return the value of column
   */
  public String getColumn()
  {
    return column;
  }

  /**
   * 设置 column
   *
   * @param column column
   */
  public void setColumn(final String column)
  {
    this.column = column;
  }

  /**
   * 获取 dir
   *
   * @return the value of dir
   */
  public String getDir()
  {
    return dir;
  }

  /**
   * 设置 dir
   *
   * @param dir dir
   */
  public void setDir(final String dir)
  {
    this.dir = dir;
  }
}
