/**
 * 
 */

/**
 * @author uicsantos
 */
public class MyFKColumn extends MyColumn {

	String ref_table;
	String ref_column;
	
	/**
	 * First Constructor of MyForeignColumn Class
	 * @param ref_table The table name where this column is pointing
	 * @param ref_column The column name where this column is pointing
	 */
	public MyFKColumn(String ref_table, String ref_column) {
		super("int", null);
		this.ref_column = ref_column;
		this.ref_table = ref_table;
	}
	
	/**
	 * @return the columns that is pointed
	 */
	public String getRefColumn(){
		return this.ref_column;
	}
	
	/**
	 * @return the table that is pointed
	 */
	public String getRefTable(){
		return this.ref_table;
	}
	
	/**
	 * Second Constructor of MyForeignColumn Class
	 * @param type The type of this column
	 * @param size The size of this column
	 * @param ref_table The table name where this column is pointing
	 * @param ref_column The column name where this column is pointing
	 */
	public MyFKColumn(String type, Integer size, String ref_table, String ref_column) {
		super(type, size);
		this.ref_column = ref_column;
		this.ref_table = ref_table;
	}


	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		MyColumn column2 = new MyFKColumn("nvarchar",300,"User","UserId");
		MyColumn column1 = new MyColumn("RoleId",50);
		
		System.out.println(column1.getType());
		System.out.println(column1.getSize());
		System.out.println(column1.getRefTable());
		System.out.println(column1.getRefColumn());
		
		
		System.out.println(column2.getType());
		System.out.println(column2.getSize());
		

	}

}
