// Persist library : Persistence layer
// Copyright (C) 2003 Vincent Daron
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections;
using Persist.Sql;
using Persist.Maps;
namespace Persist.Criteria{
/// <summary>
/// This class is the base class for all criteria elements.
/// </summary>
public abstract class SelectionCriteria : ICriteriaPart
{
private AttributeMap attributeMap = null;
private ClassMap classMap = null;
/// <summary>
/// Complete the SQL Statement with this Criteria
/// </summary>
/// <param name="statement">the SqlStatement to complete</param>
/// <param name="parameters">the Available Parameters Queue</param>
public abstract void FillSqlStatement(SqlStatement statement, Queue parameters);
/// <summary>
/// Create a SelectionCriteria
/// </summary>
/// <param name="classMap">the ClassMap of this statement</param>
/// <param name="attributeMap">theAttributeMap of this Criteria</param>
internal SelectionCriteria(ClassMap classMap, AttributeMap attributeMap)
{
this.attributeMap = attributeMap;
this.classMap = classMap;
}
/// <summary>
/// Return the AttributeMap of this SelectionCriteria
/// </summary>
internal AttributeMap AttributeMap
{
get
{
return attributeMap;
}
}
/// <summary>
/// Return the ClassMap of this SelectionCriteria
/// </summary>
internal ClassMap ClassMap
{
get
{
return classMap;
}
}
}
}
|