Exemplo n.º 1
0
        public void AddComponent(XmlElement parent, PropertyAuditingData propertyAuditingData,
								 IValue value, ICompositeMapperBuilder mapper, string entityName,
								 EntityXmlMappingData xmlMappingData, bool firstPass, bool insertable)
        {
            var propComponent = (Component) value;

            var componentMapper = mapper.AddComponent(propertyAuditingData.GetPropertyData(),
                                                                          propComponent.ComponentClassName);

            // The property auditing data must be for a component.
            var componentAuditingData = (ComponentAuditingData) propertyAuditingData;

            // Adding all properties of the component
            foreach (var property in propComponent.PropertyIterator)
            {
                var componentPropertyAuditingData = componentAuditingData.GetPropertyAuditingData(property.Name);

                // Checking if that property is audited
                if (componentPropertyAuditingData != null)
                {
                    mainGenerator.AddValue(parent, property.Value, componentMapper, entityName, xmlMappingData,
                            componentPropertyAuditingData, property.IsInsertable && insertable, firstPass);
                }
            }
        }
Exemplo n.º 2
0
        public void AddComponent(XElement parent, PropertyAuditingData propertyAuditingData,
                                 IValue value, ICompositeMapperBuilder mapper, string entityName,
                                 EntityXmlMappingData xmlMappingData, bool firstPass, bool insertable)
        {
            var propComponent = (Component)value;

            var componentMapper = mapper.AddComponent(propertyAuditingData.GetPropertyData(),
                                                      propComponent.ComponentClassName);

            // The property auditing data must be for a component.
            var componentAuditingData = (ComponentAuditingData)propertyAuditingData;

            // Adding all properties of the component
            foreach (var property in propComponent.PropertyIterator)
            {
                var componentPropertyAuditingData = componentAuditingData.GetPropertyAuditingData(property.Name);

                // Checking if that property is audited
                if (componentPropertyAuditingData != null)
                {
                    mainGenerator.AddValue(parent, property.Value, componentMapper, entityName, xmlMappingData,
                                           componentPropertyAuditingData, property.IsInsertable && insertable, firstPass, false);
                }
            }
        }
        //@SuppressWarnings({"unchecked"})
        public void AddComponent(XmlElement parent, PropertyAuditingData propertyAuditingData,
            IValue value, ICompositeMapperBuilder mapper, String entityName,
            EntityXmlMappingData xmlMappingData, bool firstPass)
        {
            Component prop_component = (Component) value;

            ICompositeMapperBuilder componentMapper = mapper.AddComponent(propertyAuditingData.getPropertyData(),
                    prop_component.ComponentClassName);

            // The property auditing data must be for a component.
            ComponentAuditingData componentAuditingData = (ComponentAuditingData) propertyAuditingData;

            // Adding all properties of the component
            IEnumerator<Property> properties = (IEnumerator<Property>) prop_component.PropertyIterator.GetEnumerator();
            while (properties.MoveNext()) {
                Property property = properties.Current;

                PropertyAuditingData componentPropertyAuditingData =
                        componentAuditingData.getPropertyAuditingData(property.Name);

                // Checking if that property is audited
                if (componentPropertyAuditingData != null) {
                    mainGenerator.AddValue(parent, property.Value, componentMapper, entityName, xmlMappingData,
                            componentPropertyAuditingData, property.IsInsertable, firstPass);
                }
            }
        }
        //@SuppressWarnings({"unchecked"})
        public void AddComponent(XmlElement parent, PropertyAuditingData propertyAuditingData,
                                 IValue value, ICompositeMapperBuilder mapper, String entityName,
                                 EntityXmlMappingData xmlMappingData, bool firstPass)
        {
            Component prop_component = (Component)value;

            ICompositeMapperBuilder componentMapper = mapper.AddComponent(propertyAuditingData.getPropertyData(),
                                                                          prop_component.ComponentClassName);

            // The property auditing data must be for a component.
            ComponentAuditingData componentAuditingData = (ComponentAuditingData)propertyAuditingData;

            // Adding all properties of the component
            IEnumerator <Property> properties = (IEnumerator <Property>)prop_component.PropertyIterator.GetEnumerator();

            while (properties.MoveNext())
            {
                Property property = properties.Current;

                PropertyAuditingData componentPropertyAuditingData =
                    componentAuditingData.getPropertyAuditingData(property.Name);

                // Checking if that property is audited
                if (componentPropertyAuditingData != null)
                {
                    mainGenerator.AddValue(parent, property.Value, componentMapper, entityName, xmlMappingData,
                                           componentPropertyAuditingData, property.IsInsertable, firstPass);
                }
            }
        }