package net.northking.cctp.maven.analyse.entity;

/**
 * 数据库外键对象
 *
 * @author 谢秀松
 * @since 1.0
 */
public final class ForeignKeyRef
{
  /**
   * 关联主键表名
   */
  private String pkTableName;

  /**
   * 关联主键列名
   */
  private String pkColumnName;

  /**
   * 关联表名
   */
  private String fkTableName;

  /**
   * 关联字段名
   */
  private String fkColumnName;

  /**
   * 外键名称
   */
  private String fkName;

  /**
   * @param pkTableName  关联主键表名
   * @param pkColumnName 关联主键列名
   * @param fkTableName  关联表名
   * @param fkColumnName 关联字段名
   * @param fkName       外键名称
   */
  public ForeignKeyRef(final String pkTableName, final String pkColumnName, final String fkTableName,
                       final String fkColumnName, final String fkName)
  {
    this.pkTableName = pkTableName;
    this.pkColumnName = pkColumnName;
    this.fkTableName = fkTableName;
    this.fkColumnName = fkColumnName;
    this.fkName = fkName;
  }

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

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

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

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

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

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

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

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

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

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

  /**
   * 描述信息
   *
   * @return 描述信息
   */
  public String toString()
  {
    return fkName + "[" + pkTableName + "." + pkColumnName + "=>" + fkTableName + "." + fkColumnName + "]";
  }
}
