protected void WriteBaseCollectionAttributes(XmlElement element, CollectionMapping mapping)
        {
            if (mapping.IsSpecified("Access"))
                element.WithAtt("access", mapping.Access);

            if (mapping.IsSpecified("BatchSize"))
                element.WithAtt("batch-size", mapping.BatchSize);

            if (mapping.IsSpecified("Cascade"))
                element.WithAtt("cascade", mapping.Cascade);

            if (mapping.IsSpecified("Check"))
                element.WithAtt("check", mapping.Check);

            if (mapping.IsSpecified("CollectionType") && mapping.CollectionType != TypeReference.Empty)
                element.WithAtt("collection-type", mapping.CollectionType);

            if (mapping.IsSpecified("Fetch"))
                element.WithAtt("fetch", mapping.Fetch);

            if (mapping.IsSpecified("Generic"))
                element.WithAtt("generic", mapping.Generic);

            if (mapping.IsSpecified("Inverse"))
                element.WithAtt("inverse", mapping.Inverse);

            if (mapping.IsSpecified("Lazy"))
                element.WithAtt("lazy", mapping.Lazy.ToString().ToLowerInvariant());

            if (mapping.IsSpecified("Name"))
                element.WithAtt("name", mapping.Name);

            if (mapping.IsSpecified("OptimisticLock"))
                element.WithAtt("optimistic-lock", mapping.OptimisticLock);

            if (mapping.IsSpecified("Persister"))
                element.WithAtt("persister", mapping.Persister);

            if (mapping.IsSpecified("Schema"))
                element.WithAtt("schema", mapping.Schema);

            if (mapping.IsSpecified("TableName"))
                element.WithAtt("table", mapping.TableName);

            if (mapping.IsSpecified("Where"))
                element.WithAtt("where", mapping.Where);

            if (mapping.IsSpecified("Subselect"))
                element.WithAtt("subselect", mapping.Subselect);

            if (mapping.IsSpecified("Mutable"))
                element.WithAtt("mutable", mapping.Mutable);
        }
예제 #2
0
        protected void WriteBaseCollectionAttributes(XmlElement element, CollectionMapping mapping)
        {
            if (mapping.IsSpecified("Access"))
            {
                element.WithAtt("access", mapping.Access);
            }

            if (mapping.IsSpecified("BatchSize"))
            {
                element.WithAtt("batch-size", mapping.BatchSize);
            }

            if (mapping.IsSpecified("Cascade"))
            {
                element.WithAtt("cascade", mapping.Cascade);
            }

            if (mapping.IsSpecified("Check"))
            {
                element.WithAtt("check", mapping.Check);
            }

            if (mapping.IsSpecified("CollectionType") && mapping.CollectionType != TypeReference.Empty)
            {
                element.WithAtt("collection-type", mapping.CollectionType);
            }

            if (mapping.IsSpecified("Fetch"))
            {
                element.WithAtt("fetch", mapping.Fetch);
            }

            if (mapping.IsSpecified("Generic"))
            {
                element.WithAtt("generic", mapping.Generic);
            }

            if (mapping.IsSpecified("Inverse"))
            {
                element.WithAtt("inverse", mapping.Inverse);
            }

            if (mapping.IsSpecified("Lazy"))
            {
                element.WithAtt("lazy", mapping.Lazy.ToString().ToLowerInvariant());
            }

            if (mapping.IsSpecified("Name"))
            {
                element.WithAtt("name", mapping.Name);
            }

            if (mapping.IsSpecified("OptimisticLock"))
            {
                element.WithAtt("optimistic-lock", mapping.OptimisticLock);
            }

            if (mapping.IsSpecified("Persister"))
            {
                element.WithAtt("persister", mapping.Persister);
            }

            if (mapping.IsSpecified("Schema"))
            {
                element.WithAtt("schema", mapping.Schema);
            }

            if (mapping.IsSpecified("TableName"))
            {
                element.WithAtt("table", mapping.TableName);
            }

            if (mapping.IsSpecified("Where"))
            {
                element.WithAtt("where", mapping.Where);
            }

            if (mapping.IsSpecified("Subselect"))
            {
                element.WithAtt("subselect", mapping.Subselect);
            }

            if (mapping.IsSpecified("Mutable"))
            {
                element.WithAtt("mutable", mapping.Mutable);
            }
        }
 /// <summary>
 /// Represents a string identifier for the model instance, used in conventions for a lazy
 /// shortcut.
 ///
 /// e.g. for a ColumnMapping the StringIdentifierForModel would be the Name attribute,
 /// this allows the user to find any columns with the matching name.
 /// </summary>
 public bool IsSet(Member property)
 {
     return(mapping.IsSpecified(propertyMappings.Get(property)));
 }