nativesqlquerynonscalarreturn.cs
来自「NHibernate NET开发者所需的」· CS 代码 · 共 55 行
CS
55 行
using System;
using System.Collections;
using NHibernate.Util;
namespace NHibernate.Engine.Query.Sql
{
/// <summary>
/// Represents the base information for a non-scalar return defined as part of
/// a native sql query.
/// </summary>
[Serializable]
public abstract class NativeSQLQueryNonScalarReturn : INativeSQLQueryReturn
{
private readonly string alias;
private readonly Hashtable propertyResults = new Hashtable();
private readonly LockMode lockMode;
/// <summary> Constructs some form of non-scalar return descriptor </summary>
/// <param name="alias">The result alias </param>
/// <param name="propertyResults">Any user-supplied column->property mappings </param>
/// <param name="lockMode">The lock mode to apply to the return. </param>
protected internal NativeSQLQueryNonScalarReturn(string alias, IDictionary propertyResults, LockMode lockMode)
{
if (string.IsNullOrEmpty(alias))
throw new ArgumentNullException("alias", "A valid scalar alias must be specified.");
this.alias = alias;
this.lockMode = lockMode;
if (propertyResults != null)
{
ArrayHelper.AddAll(this.propertyResults, propertyResults);
}
}
/// <summary> Retrieve the defined result alias </summary>
public string Alias
{
get { return alias; }
}
/// <summary> Retrieve the lock-mode to apply to this return </summary>
public LockMode LockMode
{
get { return lockMode; }
}
/// <summary> Retrieve the user-supplied column->property mappings. </summary>
public Hashtable PropertyResultsMap
{
get { return propertyResults; }
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?