本文整理汇总了C#中IAssociationType.GetColumnSpan方法的典型用法代码示例。如果您正苦于以下问题:C# IAssociationType.GetColumnSpan方法的具体用法?C# IAssociationType.GetColumnSpan怎么用?C# IAssociationType.GetColumnSpan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAssociationType
的用法示例。
在下文中一共展示了IAssociationType.GetColumnSpan方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAliasedLHSColumnNames
/// <summary>
/// Get the aliased columns of the owning entity which are to
/// be used in the join
/// </summary>
public static string[] GetAliasedLHSColumnNames(
IAssociationType type,
string alias,
int property,
int begin,
IOuterJoinLoadable lhsPersister,
IMapping mapping
)
{
if (type.UseLHSPrimaryKey)
{
return StringHelper.Qualify(alias, lhsPersister.IdentifierColumnNames);
}
else
{
string propertyName = type.LHSPropertyName;
if (propertyName == null)
{
return ArrayHelper.Slice(
lhsPersister.ToColumns(alias, property),
begin,
type.GetColumnSpan(mapping)
);
}
else
{
return ((IPropertyMapping) lhsPersister).ToColumns(alias, propertyName); //bad cast
}
}
}
示例2: GetAliasedColumnNames
public string[] GetAliasedColumnNames(IAssociationType type, int begin)
{
if (type.UseLHSPrimaryKey)
{
return StringHelper.Qualify(Alias, Persister.IdentifierColumnNames);
}
else
{
string propertyName = type.LHSPropertyName;
if (propertyName == null)
{
return ArrayHelper.Slice(GetAliasedColumns(), begin, type.GetColumnSpan(Mapping));
}
else
{
return ((IPropertyMapping)Persister).ToColumns(Alias, propertyName); //bad cast
}
}
}
示例3: GetLHSColumnNames
/// <summary>
/// Get the columns of the owning entity which are to
/// be used in the join
/// </summary>
public static string[] GetLHSColumnNames(
IAssociationType type,
int property,
int begin,
IOuterJoinLoadable lhsPersister,
IMapping mapping
)
{
if (type.UseLHSPrimaryKey)
{
//return lhsPersister.getSubclassPropertyColumnNames(property);
return lhsPersister.IdentifierColumnNames;
}
else
{
string propertyName = type.LHSPropertyName;
if (propertyName == null)
{
//slice, to get the columns for this component
//property
return ArrayHelper.Slice(
lhsPersister.GetSubclassPropertyColumnNames(property),
begin,
type.GetColumnSpan(mapping)
);
}
else
{
//property-refs for associations defined on a
//component are not supported, so no need to slice
return lhsPersister.GetPropertyColumnNames(propertyName);
}
}
}
示例4: GetColumnNames
public string[] GetColumnNames(IAssociationType type, int begin)
{
if (type.UseLHSPrimaryKey)
{
return Persister.IdentifierColumnNames;
}
else
{
string propertyName = type.LHSPropertyName;
if (propertyName == null)
{
//slice, to get the columns for this component property
return ArrayHelper.Slice(GetColumns(), begin, type.GetColumnSpan(Mapping));
}
else
{
//property-refs for associations defined on a
//component are not supported, so no need to slice
return Persister.GetPropertyColumnNames(propertyName);
}
}
}