#region Apache Notice
/*****************************************************************************
* $Header: $
* $Revision: 383115 $
* $Date$
*
* iBATIS.NET Data Mapper
* Copyright (C) 2008/2005 - The Apache Software Foundation
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
********************************************************************************/
#endregion
#region Imports
using System;
using System.Xml.Serialization;
using Apache.Ibatis.DataMapper.Exceptions;
using Apache.Ibatis.DataMapper.Model.ParameterMapping;
using Apache.Ibatis.DataMapper.Model.ResultMapping;
using Apache.Ibatis.Common.Utilities.Objects;
using Apache.Ibatis.DataMapper.Model.Cache;
using System.Diagnostics;
using Apache.Ibatis.DataMapper.Model.Sql.External;
#endregion
namespace Apache.Ibatis.DataMapper.Model.Statements
{
///
/// Represent an insert statement.
///
[Serializable]
[DebuggerDisplay("Insert: {Id}")]
public class Insert : Statement
{
[NonSerialized]
private SelectKey selectKey = null;
///
/// Extend statement attribute
///
public override string ExtendStatement
{
get { return string.Empty; }
}
///
/// The selectKey statement used by an insert statement.
///
public SelectKey SelectKey
{
get { return selectKey; }
}
///
/// Initializes a new instance of the class.
///
/// The id.
/// The parameter class.
/// The parameter map.
/// The result class.
/// The result maps.
/// The list class.
/// The list class factory.
/// The cache model.
/// if set to true [remap results].
/// The extends.
/// The select key.
/// The SQL source.
/// Preserve whitespace.
public Insert(
string id,
Type parameterClass,
ParameterMap parameterMap,
Type resultClass,
ResultMapCollection resultMaps,
Type listClass,
IFactory listClassFactory,
CacheModel cacheModel,
bool remapResults,
string extends,
SelectKey selectKey,
ISqlSource sqlSource,
bool preserveWhitespace
)
: base(id, parameterClass, parameterMap, resultClass, resultMaps, listClass, listClassFactory, cacheModel, remapResults, extends, sqlSource, preserveWhitespace)
{
this.selectKey = selectKey;
}
}
}