Package org.hibernate.envers.revisioninfo

Examples of org.hibernate.envers.revisioninfo.DefaultTrackingModifiedTypesRevisionInfoGenerator


                if (globalCfg.isTrackEntitiesChangedInRevisionEnabled() ||
                        DefaultTrackingModifiedTypesRevisionEntity.class.isAssignableFrom(revisionInfoClass) ||
                        modifiedEntityTypesFound.isSet()) {
                    // If tracking modified entities parameter is enabled, custom revision info entity is a subtype
                    // of DefaultTrackingModifiedTypesRevisionEntity class, or @ModifiedEntityTypes annotation is used.
                    revisionInfoGenerator = new DefaultTrackingModifiedTypesRevisionInfoGenerator(revisionInfoEntityName,
                            revisionInfoClass, revisionEntity.value(), revisionInfoTimestampData, isTimestampAsDate(),
                            modifiedEntityTypesData);
                    globalCfg.setTrackEntitiesChangedInRevisionEnabled(true);
                } else {
                    revisionInfoGenerator = new DefaultRevisionInfoGenerator(revisionInfoEntityName, revisionInfoClass,
                            revisionEntity.value(), revisionInfoTimestampData, isTimestampAsDate());
                }
            }
        }

        // In case of a custom revision info generator, the mapping will be null.
        Document revisionInfoXmlMapping = null;

        if (revisionInfoGenerator == null) {
            if (globalCfg.isTrackEntitiesChangedInRevisionEnabled()) {
                revisionInfoClass = DefaultTrackingModifiedTypesRevisionEntity.class;
                revisionInfoEntityName = DefaultTrackingModifiedTypesRevisionEntity.class.getName();
                revisionInfoGenerator = new DefaultTrackingModifiedTypesRevisionInfoGenerator(revisionInfoEntityName, revisionInfoClass,
                        RevisionListener.class, revisionInfoTimestampData, isTimestampAsDate(), modifiedEntityTypesData);
            } else {
                revisionInfoClass = DefaultRevisionEntity.class;
                revisionInfoGenerator = new DefaultRevisionInfoGenerator(revisionInfoEntityName, revisionInfoClass,
                        RevisionListener.class, revisionInfoTimestampData, isTimestampAsDate());
View Full Code Here

TOP

Related Classes of org.hibernate.envers.revisioninfo.DefaultTrackingModifiedTypesRevisionInfoGenerator

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.