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

studio.raptor.sqlparser.fast.table.Column Maven / Gradle / Ivy

/*
 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (http://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */
package studio.raptor.sqlparser.fast.table;

/**
 * This class represents a column in a table.
 */
public class Column {

  // used
  private String name;
  private String alias;

  public Column(String columnName) {
    this(columnName, null);
  }

  public Column(String columnName, String alias) {
    this.name = columnName;
    this.alias = alias;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    } else if (!(o instanceof Column)) {
      return false;
    }
    Column other = (Column) o;
    return name.equals(other.name) || (null != alias && alias.equals(other.getAlias()));
  }

  public String getAlias() {
    return alias;
  }

  public String getName() {
    return name;
  }

  @Override
  public String toString() {
    return name;
  }

  public String getSQL() {
    return "";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy