Package org.hibernate.envers.configuration.metadata.reader

Examples of org.hibernate.envers.configuration.metadata.reader.ComponentAuditingData


      // Collection of embeddable elements.
      final Component component = (Component) value;
      final MiddleEmbeddableComponentMapper componentMapper = new MiddleEmbeddableComponentMapper( new MultiPropertyMapper(), component.getComponentClassName() );

      final Element parentXmlMapping = xmlMapping.getParent();
      final ComponentAuditingData auditData = new ComponentAuditingData();
      final ReflectionManager reflectionManager = mainGenerator.getCfg().getReflectionManager();

      new ComponentAuditedPropertiesReader(
          ModificationStore.FULL,
          new AuditedPropertiesReader.ComponentPropertiesSource( reflectionManager, component ),
          auditData, mainGenerator.getGlobalCfg(), reflectionManager, ""
      ).read();

      // Emulating first pass.
      for ( String auditedPropertyName : auditData.getPropertyNames() ) {
        PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
        mainGenerator.addValue(
            parentXmlMapping, component.getProperty( auditedPropertyName ).getValue(), componentMapper,
            prefix, xmlMappingData, nestedAuditingData, true, true, true
        );
      }

      // Emulating second pass so that the relations can be mapped too.
      for ( String auditedPropertyName : auditData.getPropertyNames() ) {
        PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
        mainGenerator.addValue(
            parentXmlMapping, component.getProperty( auditedPropertyName ).getValue(),
            componentMapper, referencingEntityName, xmlMappingData, nestedAuditingData,
            true, false, true
        );
View Full Code Here


    CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData(),
        prop_component.getComponentClassName());

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

    // Adding all properties of the component
    Iterator<Property> properties = (Iterator<Property>) prop_component.getPropertyIterator();
    while (properties.hasNext()) {
      Property property = properties.next();

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

      // Checking if that property is audited
      if (componentPropertyAuditingData != null) {
        mainGenerator.addValue(parent, property.getValue(), componentMapper, entityName, xmlMappingData,
            componentPropertyAuditingData, property.isInsertable(), firstPass);
View Full Code Here

    CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData(),
        prop_component.getComponentClassName());

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

    // Adding all properties of the component
    Iterator<Property> properties = (Iterator<Property>) prop_component.getPropertyIterator();
    while (properties.hasNext()) {
      Property property = properties.next();

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

      // Checking if that property is audited
      if (componentPropertyAuditingData != null) {
        mainGenerator.addValue(parent, property.getValue(), componentMapper, entityName, xmlMappingData,
            componentPropertyAuditingData, property.isInsertable(), firstPass);
View Full Code Here

    CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData(),
        prop_component.getComponentClassName());

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

    // Adding all properties of the component
    Iterator<Property> properties = (Iterator<Property>) prop_component.getPropertyIterator();
    while (properties.hasNext()) {
      Property property = properties.next();

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

      // Checking if that property is audited
      if (componentPropertyAuditingData != null) {
        mainGenerator.addValue(parent, property.getValue(), componentMapper, entityName, xmlMappingData,
            componentPropertyAuditingData, property.isInsertable(), firstPass);
View Full Code Here

    CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData(),
        prop_component.getComponentClassName());

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

    // Adding all properties of the component
    Iterator<Property> properties = (Iterator<Property>) prop_component.getPropertyIterator();
    while (properties.hasNext()) {
      Property property = properties.next();

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

      // Checking if that property is audited
      if (componentPropertyAuditingData != null) {
        mainGenerator.addValue(parent, property.getValue(), componentMapper, entityName, xmlMappingData,
            componentPropertyAuditingData, property.isInsertable(), firstPass, false);
View Full Code Here

      // Collection of embeddable elements.
      final Component component = (Component) value;
      final MiddleEmbeddableComponentMapper componentMapper = new MiddleEmbeddableComponentMapper( new MultiPropertyMapper(), component.getComponentClassName() );

      final Element parentXmlMapping = xmlMapping.getParent();
      final ComponentAuditingData auditData = new ComponentAuditingData();
      final ReflectionManager reflectionManager = mainGenerator.getCfg().getReflectionManager();

      new ComponentAuditedPropertiesReader(
          ModificationStore.FULL,
          new AuditedPropertiesReader.ComponentPropertiesSource( reflectionManager, component ),
          auditData, mainGenerator.getGlobalCfg(), reflectionManager, ""
      ).read();

      // Emulating first pass.
      for ( String auditedPropertyName : auditData.getPropertyNames() ) {
        PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
        mainGenerator.addValue(
            parentXmlMapping, component.getProperty( auditedPropertyName ).getValue(), componentMapper,
            prefix, xmlMappingData, nestedAuditingData, true, true, true
        );
      }

      // Emulating second pass so that the relations can be mapped too.
      for ( String auditedPropertyName : auditData.getPropertyNames() ) {
        PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
        mainGenerator.addValue(
            parentXmlMapping, component.getProperty( auditedPropertyName ).getValue(),
            componentMapper, referencingEntityName, xmlMappingData, nestedAuditingData,
            true, false, true
        );
View Full Code Here

TOP

Related Classes of org.hibernate.envers.configuration.metadata.reader.ComponentAuditingData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.