package eu.dnetlib.dlms.jdbc;

import eu.dnetlib.dlms.lowlevel.objects.DorotyObjectEnum;

/**
 * Class to describe result set columns.
 * 
 * @author lexis
 */
public class ColumnInfo {

	/** Type of the data contained by this column. */
	private DorotyObjectEnum type;
	/** Column name. */
	private String name;

	/** Constructor. */
	public ColumnInfo() {
	}

	/**
	 * Constructor.
	 * 
	 * @param name
	 *            column name
	 * @param type
	 *            DorotyObjectEnum, type of the column
	 */
	public ColumnInfo(final String name, final DorotyObjectEnum type) {
		this.name = name;
		this.type = type;
	}

	public DorotyObjectEnum getType() {
		return this.type;
	}

	public void setType(final DorotyObjectEnum type) {
		this.type = type;
	}

	public String getName() {
		return this.name;
	}

	public void setName(final String name) {
		this.name = name;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ColumnInfo [name=" + this.name + ", type=" + this.type + "]";
	}

}
