/*
 * Created on Mar 1, 2004
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package LumiSoft.Data;

/**
 * @author Ivar
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class DataRelation 
{
	private String       m_RelationName   = "";
	private DataColumn[] m_pParentColumns = null;
	private DataColumn[] m_pChildColumns  = null;
	
	/**
	 * 
	 * @param relationName
	 * @param parentColumn
	 * @param childColumn
	 */
	protected DataRelation(String relationName,DataColumn parentColumn,DataColumn childColumn)
	{
		m_RelationName   = relationName;
		m_pParentColumns = new DataColumn[]{parentColumn};
		m_pChildColumns  = new DataColumn[]{childColumn};
	}
	
	
	/**
	 * Gets the name used to retrieve a DataRelation from the DataRelationCollection.
	 * @return
	 */
	public String getRelationName()
	{
		return m_RelationName;
	}
	
	/**
	 * Gets the parent DataColumn objects of this relation.
	 * @return
	 */
	public DataColumn[] getParentColumns()
	{
		return m_pParentColumns;
	}
	
	/**
	 * Gets the child DataColumn objects of this relation.
	 * @return
	 */
	public DataColumn[] getChildColumns()
	{
		return m_pChildColumns;
	}
}
