|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace searchComponent.structure
{
/// <summary>
/// This class represents a join statement. The join can be left, inner or right and
/// operates on two columns referenced by the names of tables and columns in the
/// fields.
/// </summary>
public class JoinStatement
{
#region Enums
/// <summary>
/// The type of join to use qhen binding to a SQL query expression
/// </summary>
public enum JoinType
{
Inner, Left, Right, Outer
};
#endregion
#region Fields
/// <summary>
/// This string contains the base table column in the format <table>.<column>
/// </summary>
private string _baseTableColumn;
/// <summary>
/// This string contains the join table column in the format <table>.<column>
/// </summary>
private string _joinTableColumn;
/// <summary>
/// The type of join to use
/// </summary>
private JoinType _type;
#endregion
#region Attributes
/// <summary>
/// Obtains the value of the base table column field
/// </summary>
public string BaseTableColumn
{
get { return this._baseTableColumn; }
}
/// <summary>
/// Obtains the value of the join table column field
/// </summary>
public string JoinTableColumn
{
get { return this._joinTableColumn; }
}
/// <summary>
/// The type of join to use
/// </summary>
public JoinType Type
{
get { return this._type; }
}
#endregion
#region Constructor
/// <summary>
/// Constructor only assigns the parameters to the object fields.
/// </summary>
/// <param name="baseTable"></param>
/// <param name="joinTable"></param>
/// <param name="typeOfJoin"></param>
public JoinStatement(string baseTable, string joinTable, JoinType typeOfJoin)
{
this._baseTableColumn = baseTable;
this._joinTableColumn = joinTable;
this._type = typeOfJoin;
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
just a coder. Love Java, but working on asp.net