//@SuppressWarnings({"unchecked"})
 private void AddProperties(XmlElement parent, IEnumerator<Property> properties, ICompositeMapperBuilder currentMapper,
                            ClassAuditingData auditingData, String entityName, EntityXmlMappingData xmlMappingData,
                            bool firstPass)
 {
     while (properties.MoveNext())
     {
         Property property = properties.Current;
         String propertyName = property.Name;
         PropertyAuditingData propertyAuditingData = auditingData.getPropertyAuditingData(propertyName);
         if (propertyAuditingData != null)
         {
             AddValue(parent, property.Value, currentMapper, entityName, xmlMappingData, propertyAuditingData,
                     property.IsInsertable, firstPass);
         }
     }
 }
        private bool CheckPropertiesAudited(IEnumerator<Property> properties, ClassAuditingData auditingData)
        {
            while (properties.MoveNext())
            {
                Property property = properties.Current;
                String propertyName = property.Name;
                PropertyAuditingData propertyAuditingData = auditingData.getPropertyAuditingData(propertyName);
                if (propertyAuditingData == null)
                {
                    return false;
                }
            }

            return true;
        }
        private static void ForcePropertyInsertable(ClassAuditingData classAuditingData, String propertyName,
            String entityName, String referencedEntityName)
        {
            if (propertyName != null) {
                if (classAuditingData.getPropertyAuditingData(propertyName) == null) {
                    throw new MappingException("@AuditMappedBy points to a property that doesn't exist: " +
                        referencedEntityName + "." + propertyName);
                }

                log.Debug("Non-insertable property " + referencedEntityName + "." + propertyName +
                        " will be made insertable because a matching @AuditMappedBy was found in the " +
                        entityName + " entity.");

                classAuditingData
                        .getPropertyAuditingData(propertyName)
                        .ForceInsertable = true;
            }
        }