protected override void SetupRelationAllValue(RelationRowCreationResource res)
 {
     System.Collections.Generic.IDictionary <String, IPropertyType> propertyCacheElement = res.ExtractPropertyCacheElement();
     System.Collections.Generic.ICollection <String> columnNameCacheElementKeySet        = propertyCacheElement.Keys;
     foreach (String columnName in columnNameCacheElementKeySet)
     {
         IPropertyType pt = propertyCacheElement[columnName];
         res.CurrentPropertyType = pt;
         if (!IsValidRelationPerPropertyLoop(res))
         {
             res.ClearRowInstance();
             return;
         }
         SetupRelationProperty(res);
     }
     if (!IsValidRelationAfterPropertyLoop(res))
     {
         res.ClearRowInstance();
         return;
     }
     res.ClearValidValueCount();
     if (res.HasNextRelationProperty() && (HasConditionBean(res) || res.HasNextRelationLevel()))
     {
         SetupNextRelationRow(res);
     }
 }
        protected override void SetupPropertyCache(RelationRowCreationResource res)
        {
            // - - - - - - - - - - -
            // Recursive Call Point!
            // - - - - - - - - - - -
            res.InitializePropertyCacheElement();

            // Do only selected foreign property for performance if condition-bean exists.
            if (HasConditionBean(res) && !HasSelectedForeignInfo(res))
            {
                return;
            }

            // Set up property cache about current beanMetaData.
            IBeanMetaData nextBmd = res.GetRelationBeanMetaData();

            for (int i = 0; i < nextBmd.PropertyTypeSize; ++i)
            {
                IPropertyType pt = nextBmd.GetPropertyType(i);
                res.CurrentPropertyType = pt;
                if (!IsTargetProperty(res))
                {
                    continue;
                }
                SetupPropertyCacheElement(res);
            }

            // Set up next relation.
            if (res.HasNextRelationProperty() && (HasConditionBean(res) || res.HasNextRelationLevel()))
            {
                res.BackupRelationPropertyType();
                res.IncrementCurrentRelationNestLevel();
                try {
                    SetupNextPropertyCache(res, nextBmd);
                } finally {
                    res.RestoreRelationPropertyType();
                    res.DecrementCurrentRelationNestLevel();
                }
            }
        }