Package org.hibernate.envers.entities

Examples of org.hibernate.envers.entities.PropertyData


    public IdMapper prefixMappedProperties(String prefix) {
        MultipleIdMapper ret = new MultipleIdMapper(compositeIdClass);

        for (PropertyData propertyData : ids.keySet()) {
            String propertyName = propertyData.getName();
            ret.ids.put(propertyData, new SingleIdMapper(new PropertyData(prefix + propertyName, propertyData)));
        }

        return ret;
    }
View Full Code Here


        Setter setter = ReflectionTools.getSetter(objTo.getClass(), propertyData);
        setter.set(objTo, getter.get(objFrom), null);
    }

    public IdMapper prefixMappedProperties(String prefix) {
        return new SingleIdMapper(new PropertyData(prefix + propertyData.getName(), propertyData));
    }
View Full Code Here

    public IdMapper prefixMappedProperties(String prefix) {
        EmbeddedIdMapper ret = new EmbeddedIdMapper(idPropertyData, compositeIdClass);

        for (PropertyData propertyData : ids.keySet()) {
            String propertyName = propertyData.getName();
            ret.ids.put(propertyData, new SingleIdMapper(new PropertyData(prefix + propertyName, propertyData)));
        }

        return ret;
    }
View Full Code Here

        return new IdMappingData(mapper, orig_id_mapping, rel_id_mapping);
    }

    private PropertyData getIdPropertyData(Property property) {
        return new PropertyData(property.getName(), property.getName(), property.getPropertyAccessorName(),
        ModificationStore.FULL);
    }
View Full Code Here

    public void setAccessType(String accessType) {
        this.accessType = accessType;
    }

    public PropertyData getPropertyData() {
        return new PropertyData(name, beanName, accessType, store);
    }
View Full Code Here

            fakeBidirectionalRelationMapper = new ToOneIdMapper(
                    relMapper,
                    // The mapper will only be used to map from entity to map, so no need to provide other details
                    // when constructing the PropertyData.
                    new PropertyData(auditMappedBy, null, null, null),
                    referencingEntityName, false);

            // Checking if there's an index defined. If so, adding a mapper for it.
            if (propertyAuditingData.getPositionMappedBy() != null) {
                String positionMappedBy = propertyAuditingData.getPositionMappedBy();
                fakeBidirectionalRelationIndexMapper = new SinglePropertyMapper(new PropertyData(positionMappedBy, null, null, null));

                // Also, overwriting the index component data to properly read the index.
                indexComponentData = new MiddleComponentData(new MiddleStraightComponentMapper(positionMappedBy), 0);
            } else {
                fakeBidirectionalRelationIndexMapper = null;
View Full Code Here

        return new IdMappingData(mapper, orig_id_mapping, rel_id_mapping);
    }

    private PropertyData getIdPropertyData(Property property) {
        return new PropertyData(property.getName(), property.getName(), property.getPropertyAccessorName(),
        ModificationStore.FULL);
    }
View Full Code Here

        MetadataTools.prefixNamesInPropertyElement(properties, lastPropertyPrefix,
                MetadataTools.getColumnNameIterator(value.getColumnIterator()), false, insertable);
        parent.add(properties);

        // Adding mapper for the id
        PropertyData propertyData = propertyAuditingData.getPropertyData();
        mapper.addComposite(propertyData, new ToOneIdMapper(relMapper, propertyData, referencedEntityName, nonInsertableFake));
    }
View Full Code Here

        mainGenerator.getEntitiesConfigurations().get(entityName).addToOneNotOwningRelation(
                propertyAuditingData.getName(), owningReferencePropertyName,
                referencedEntityName, ownedIdMapper);

        // Adding mapper for the id
        PropertyData propertyData = propertyAuditingData.getPropertyData();
        mapper.addComposite(propertyData, new OneToOneNotOwningMapper(owningReferencePropertyName,
                referencedEntityName, propertyData));
    }
View Full Code Here

    private String revisionPropType;
    private String revisionPropSqlType;

    public RevisionInfoConfiguration() {
        revisionInfoEntityName = "org.hibernate.envers.DefaultRevisionEntity";
        revisionInfoIdData = new PropertyData("id", "id", "field", null);
        revisionInfoTimestampData = new PropertyData("timestamp", "timestamp", "field", null);
        revisionInfoTimestampType = new LongType();

        revisionPropType = "integer";
    }
View Full Code Here

TOP

Related Classes of org.hibernate.envers.entities.PropertyData

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.