本文整理汇总了C#中Db4objects.Db4o.Internal.Query.Processor.QCon.GetYapClass方法的典型用法代码示例。如果您正苦于以下问题:C# QCon.GetYapClass方法的具体用法?C# QCon.GetYapClass怎么用?C# QCon.GetYapClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.Query.Processor.QCon
的用法示例。
在下文中一共展示了QCon.GetYapClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FitsIntoExistingConstraintHierarchy
public bool FitsIntoExistingConstraintHierarchy(QCon constraint)
{
if (_field != null)
{
QField qf = constraint.GetField();
if (qf != null)
{
if (_field.Name() != null && !_field.Name().Equals(qf.Name()))
{
return false;
}
}
}
if (i_classMetadata == null || constraint.IsNullConstraint())
{
return true;
}
ClassMetadata classMetadata = constraint.GetYapClass();
if (classMetadata == null)
{
return false;
}
classMetadata = i_classMetadata.GetHigherOrCommonHierarchy(classMetadata);
if (classMetadata == null)
{
return false;
}
i_classMetadata = classMetadata;
return true;
}
示例2: TryAddConstraint
// FIXME: This method should go completely.
// We changed the code to create the QCandidates graph in two steps:
// (1) call fitsIntoExistingConstraintHierarchy to determine whether
// or not we need more QCandidates objects
// (2) add all constraints
// This method tries to do both in one, which results in missing
// constraints. Not all are added to all QCandiates.
// Right methodology is in
// QQueryBase#createCandidateCollection
// and
// QQueryBase#createQCandidatesList
internal bool TryAddConstraint(QCon a_constraint)
{
if (_field != null)
{
QField qf = a_constraint.GetField();
if (qf != null)
{
if (_field.Name() != null && !_field.Name().Equals(qf.Name()))
{
return false;
}
}
}
if (i_classMetadata == null || a_constraint.IsNullConstraint())
{
AddConstraint(a_constraint);
return true;
}
ClassMetadata yc = a_constraint.GetYapClass();
if (yc != null)
{
yc = i_classMetadata.GetHigherOrCommonHierarchy(yc);
if (yc != null)
{
i_classMetadata = yc;
AddConstraint(a_constraint);
return true;
}
}
AddConstraint(a_constraint);
return false;
}