Code example for Property

Methods: getValueisComposite

0
 
            // null mapper - the mapping where already added the first time, now we only want to generate the xml 
            if (!addIdProperties(orig_id_mapping, (Iterator<Property>) id_mapper.getPropertyIterator(), null, true, audited)) {
                return null; 
            } 
        } else if (id_prop.isComposite()) {
            // Embedded id 
 
            Component id_component = (Component) id_prop.getValue();
 
            mapper = new EmbeddedIdMapper(getIdPropertyData(id_prop), id_component.getComponentClassName());
            if (!addIdProperties(rel_id_mapping, (Iterator<Property>) id_component.getPropertyIterator(), mapper, false, audited)) {
                return null; 
            } 
 
            // null mapper - the mapping where already added the first time, now we only want to generate the xml 
            if (!addIdProperties(orig_id_mapping, (Iterator<Property>) id_component.getPropertyIterator(), null, true, audited)) {
                return null; 
            } 
        } else { 
            // Single id 
             
            mapper = new SingleIdMapper();
 
            // Last but one parameter: ids are always insertable 
            mainGenerator.getBasicMetadataGenerator().addBasic(rel_id_mapping,
                    getIdPersistentPropertyAuditingData(id_prop),
                    id_prop.getValue(), mapper, true, false);
 
            // null mapper - the mapping where already added the first time, now we only want to generate the xml 
            mainGenerator.getBasicMetadataGenerator().addBasic(orig_id_mapping,
                    getIdPersistentPropertyAuditingData(id_prop),
                    id_prop.getValue(), null, true, true);
        } 
 
        orig_id_mapping.addAttribute("name", mainGenerator.getVerEntCfg().getOriginalIdPropName());
 
        // Adding a relation to the revision entity (effectively: the "revision number" property)