|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace searchComponent.search
{
/// <summary>
/// This class contains a result from a search.
/// </summary>
public class SearchResult
{
#region Fields
/// <summary>
/// Data containing all the resulting rows. This will be empty when there are no rows
/// and no columns will be defined.
/// </summary>
private DataSet _data;
/// <summary>
/// This message contains possible errors in the query, messages with suggestions, the
/// number of results found, etc.
/// </summary>
private string _message;
/// <summary>
/// This field will contain the generated query that the searcher will use to generate
/// the dataset
/// </summary>
private string _generatedQuery;
#endregion
#region Attributes
/// <summary>
/// Data containing all the resulting rows. This will be empty when there are no rows
/// and no columns will be defined.
/// </summary>
public DataSet Data
{
get { return _data; }
}
/// <summary>
/// This message contains possible errors in the query, messages with suggestions, the
/// number of results found, etc.
/// </summary>
public string Message
{
get { return _message; }
}
/// <summary>
/// This field will contain the generated query that the searcher will use to generate
/// the dataset
/// </summary>
public string GeneratedQuery
{
get { return _generatedQuery; }
}
#endregion
#region Constructor
/// <summary>
/// Simple constructor, all is needed is the vaules for the fields.
/// </summary>
/// <param name="msg"></param>
/// <param name="d"></param>
public SearchResult(string msg, DataSet d, string query)
{
this._data = d;
this._message = msg;
this._generatedQuery = query;
}
#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