private void updateEntity(AttributedType attributedType, Object entityInstance, EntityManager entityManager) { EntityMapping entityMapping = getMappingsFor(attributedType.getClass()); for (Property property : entityMapping.getProperties().keySet()) { Property mappedProperty = entityMapping.getProperties().get(property); Object value = property.getValue(attributedType); if (value != null) { if (this.store.isMappedType(mappedProperty.getJavaClass())) { EntityMapper entityMapper = this.store.getMapperForEntity(mappedProperty.getJavaClass()); if (mappedProperty.getJavaClass().equals(entityMapper.getEntityType())) { AttributedType referencedType = (AttributedType) value; value = this.store.getOwnerEntity(referencedType, mappedProperty, entityManager); } } } mappedProperty.setValue(entityInstance, value); } entityManager.persist(entityInstance); }
private void updateEntity(AttributedType attributedType, Object entityInstance, EntityManager entityManager) { EntityMapping entityMapping = getMappingsFor(attributedType.getClass()); for (Property property : entityMapping.getProperties().keySet()) { Property mappedProperty = entityMapping.getProperties().get(property); Object value = property.getValue(attributedType); if (value != null) { if (this.store.isMappedType(mappedProperty.getJavaClass())) { EntityMapper entityMapper = this.store.getMapperForEntity(mappedProperty.getJavaClass()); if (mappedProperty.getJavaClass().equals(entityMapper.getEntityType())) { AttributedType referencedType = (AttributedType) value; value = this.store.getOwnerEntity(referencedType, mappedProperty, entityManager); } } } mappedProperty.setValue(entityInstance, value); } entityManager.persist(entityInstance); }
AttributedType ownerType = (AttributedType) propertyValue; if (this.store.isMappedType(mappedProperty.getJavaClass())) { if (ownerType != null) { mappedValue = entityManager.find(mappedProperty.getJavaClass(), ownerType.getId());
AttributedType ownerType = (AttributedType) propertyValue; if (this.store.isMappedType(mappedProperty.getJavaClass())) { if (ownerType != null) { mappedValue = entityManager.find(mappedProperty.getJavaClass(), ownerType.getId());
if (isMappedType(mappedProperty.getJavaClass())) { AttributedType ownerType = (AttributedType) parameterValue;
if (isMappedType(mappedProperty.getJavaClass())) { AttributedType ownerType = (AttributedType) parameterValue;
if (this.store.isMappedType(mappedProperty.getJavaClass())) { propertyValue = createType(mappedValue, entityManager);
if (isMappedType(attributeProperty.getJavaClass())) { AttributedType ownerType = (AttributedType) parameterValue;
if (isMappedType(attributeProperty.getJavaClass())) { AttributedType ownerType = (AttributedType) parameterValue;
if (this.store.isMappedType(mappedProperty.getJavaClass())) { propertyValue = createType(mappedValue, entityManager);
if (this.store.isMappedType(mappedProperty.getJavaClass())) { EntityMapper entityMapper = this.store.getMapperForEntity(mappedProperty.getJavaClass());
if (this.store.isMappedType(mappedProperty.getJavaClass())) { EntityMapper entityMapper = this.store.getMapperForEntity(mappedProperty.getJavaClass());