package geisplugin.popup.actions;

/**
 * DE: 
 *
 * EN: 
 * 
 * 
 * Program changes
 * **************************************************************************************
 * Date			* Ticket	* KonzFirm	* Responsible	* programmer    *
 * Change										*
 * **************************************************************************************
 *
 * @author huellmante
 * @version 1.0
 *
 */

public class DatabaseTableObjekt {

	private final boolean id;
	private final String columnTypeString;
	private final String columnLabelString;
	private final int columnTypeInt, precision, scale;
	private final boolean notnullable;
	
	public boolean isID() {
		return id;
	}

	public String getColumnTypeString() {
		return columnTypeString;
	}

	public String getColumnLabelString() {
		return columnLabelString;
	}

	public int getColumnTypeInt() {
		return columnTypeInt;
	}

	public int getPrecision() {
		return precision;
	}

	public int getScale() {
		return scale;
	}
	
	public boolean isNotnullable() {
		return notnullable;
	}

	public DatabaseTableObjekt(final String columnTypeString, final String columnLabelString, final int columnTypeInt, final int scale, final int precision, final boolean id, final boolean notnullable, final int columnDisplaySize) {
		this.columnTypeString = columnTypeString;
		this.columnLabelString = columnLabelString;
		this.columnTypeInt = columnTypeInt;
		this.scale = scale;
		this.precision = columnTypeString.equals("NCHAR") ? columnDisplaySize : precision;
		this.id = id;
		this.notnullable = notnullable;
	}
}
