本文整理汇总了C#中IAssociationType类的典型用法代码示例。如果您正苦于以下问题:C# IAssociationType类的具体用法?C# IAssociationType怎么用?C# IAssociationType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAssociationType类属于命名空间,在下文中一共展示了IAssociationType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssociationContainedInEnumerable
public AssociationContainedInEnumerable(AllorsExtentFilteredSql extent, IAssociationType association, IEnumerable<IObject> enumerable)
{
extent.CheckAssociation(association);
PredicateAssertions.AssertAssociationContainedIn(association, this.enumerable);
this.association = association;
this.enumerable = enumerable;
}
示例2: AssociationExists
internal AssociationExists(ExtentFiltered extent, IAssociationType associationType)
{
extent.CheckForAssociationType(associationType);
PredicateAssertions.ValidateAssociationExists(associationType);
this.associationType = associationType;
}
示例3: GetJoinType
protected override JoinType GetJoinType(IAssociationType type, FetchMode config, string path,
string lhsTable, string[] lhsColumns, bool nullable, int currentDepth, CascadeStyle cascadeStyle)
{
if (translator.IsJoin(path))
{
return translator.GetJoinType(path);
}
else
{
if (translator.HasProjection)
{
return JoinType.None;
}
else
{
FetchMode fetchMode = translator.RootCriteria.GetFetchMode(path);
if (IsDefaultFetchMode(fetchMode))
{
return base.GetJoinType(type, config, path, lhsTable, lhsColumns, nullable, currentDepth, cascadeStyle);
}
else
{
if (fetchMode == FetchMode.Join)
{
IsDuplicateAssociation(lhsTable, lhsColumns, type); //deliberately ignore return value!
return GetJoinType(nullable, currentDepth);
}
else
{
return JoinType.None;
}
}
}
}
}
示例4: 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
}
}
}
示例5: AssociationContainedInExtent
internal AssociationContainedInExtent(ExtentFiltered extent, IAssociationType association, Allors.Extent inExtent)
{
extent.CheckAssociation(association);
PredicateAssertions.AssertAssociationContainedIn(association, inExtent);
this.association = association;
this.inExtent = ((Extent)inExtent).ContainedInExtent;
}
示例6: IsJoinedFetchEnabled
/// <summary>
/// Disable outer join fetching if this loader obtains an
/// upgrade lock mode
/// </summary>
protected override bool IsJoinedFetchEnabled(IAssociationType type, FetchMode config,
Cascades.CascadeStyle cascadeStyle)
{
return lockMode.GreaterThan(LockMode.Read) ?
false :
base.IsJoinedFetchEnabled(type, config, cascadeStyle);
}
示例7: AllorsPredicateAssociationInExtentSql
internal AllorsPredicateAssociationInExtentSql(AllorsExtentFilteredSql extent, IAssociationType association, Extent inExtent)
{
extent.CheckAssociation(association);
PredicateAssertions.AssertAssociationContainedIn(association, inExtent);
this.association = association;
this.inExtent = (AllorsExtentSql) inExtent;
}
示例8: CheckForAssociationType
internal void CheckForAssociationType(IAssociationType association)
{
if (!this.objectType.ExistAssociationType(association))
{
throw new ArgumentException("Extent does not have association " + association);
}
}
示例9: 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);
}
}
}
示例10: AllorsPredicateAssociationContainsSql
internal AllorsPredicateAssociationContainsSql(AllorsExtentFilteredSql extent, IAssociationType association, IObject allorsObject)
{
extent.CheckAssociation(association);
PredicateAssertions.AssertAssociationContains(association, allorsObject);
this.association = association;
this.allorsObject = allorsObject;
}
示例11: GetJoinType
protected virtual JoinType GetJoinType( IAssociationType type, OuterJoinFetchStrategy config, string path, string table, string[] foreignKeyColumns, ISessionFactoryImplementor factory )
{
bool mappingDefault = IsJoinedFetchEnabledByDefault( config, type, factory );
return IsJoinedFetchEnabled( type, mappingDefault, path, table, foreignKeyColumns) ?
JoinType.LeftOuterJoin :
JoinType.None;
}
示例12: AllorsPredicateAssociationInstanceofSql
internal AllorsPredicateAssociationInstanceofSql(AllorsExtentFilteredSql extent, IAssociationType association, IObjectType instanceType, IClass[] instanceClasses)
{
extent.CheckAssociation(association);
PredicateAssertions.ValidateAssociationInstanceof(association, instanceType);
this.association = association;
this.instanceClasses = instanceClasses;
}
示例13: AssociationEquals
internal AssociationEquals(ExtentFiltered extent, IAssociationType association, IObject allorsObject)
{
extent.CheckAssociation(association);
PredicateAssertions.AssertAssociationEquals(association, allorsObject);
this.association = association;
this.allorsObject = allorsObject;
}
示例14: AssociationContains
internal AssociationContains(ExtentFiltered extent, IAssociationType associationType, IObject containedObject)
{
extent.CheckForAssociationType(associationType);
PredicateAssertions.AssertAssociationContains(associationType, containedObject);
this.associationType = associationType;
this.containedObject = containedObject;
}
示例15: AssociationContainedInEnumerable
internal AssociationContainedInEnumerable(ExtentFiltered extent, IAssociationType associationType, IEnumerable<IObject> containingEnumerable)
{
extent.CheckForAssociationType(associationType);
PredicateAssertions.AssertAssociationContainedIn(associationType, containingEnumerable);
this.associationType = associationType;
this.containingEnumerable = containingEnumerable;
}