Source:
protected MapSqlParameterSource createFullParametersMapper(Provider<?> entity) { MapSqlParameterSource mapper = createBaseProviderParametersMapper(entity); String tenantName = null; String pluginType = null; boolean readOnly = false; boolean isUnmanaged = false; AgentConfiguration agentConfiguration = null; AdditionalProperties additionalProperties = null; if (entity.getAdditionalProperties() != null) { switch (entity.getType()) { case EXTERNAL_NETWORK: case OPENSTACK_NETWORK: OpenstackNetworkProviderProperties networkProperties = (OpenstackNetworkProviderProperties) entity.getAdditionalProperties(); readOnly = networkProperties.getReadOnly(); isUnmanaged = entity.getIsUnmanaged(); tenantName = networkProperties.getTenantName(); pluginType = networkProperties.getPluginType(); agentConfiguration = networkProperties.getAgentConfiguration(); break; case OPENSTACK_IMAGE: OpenStackImageProviderProperties imageProperties = (OpenStackImageProviderProperties) entity.getAdditionalProperties(); tenantName = imageProperties.getTenantName(); break; case OPENSTACK_VOLUME: OpenStackVolumeProviderProperties volumeProperties = (OpenStackVolumeProviderProperties) entity.getAdditionalProperties(); tenantName = volumeProperties.getTenantName(); break; case VMWARE: case KVM: case XEN: additionalProperties = entity.getAdditionalProperties(); break; default: break; } } mapper.addValue("tenant_name", tenantName); mapper.addValue("plugin_type", pluginType); mapper.addValue("agent_configuration", SerializationFactory.getSerializer().serialize(agentConfiguration)); mapper.addValue("additional_properties", SerializationFactory.getSerializer().serialize(additionalProperties)); mapper.addValue("read_only", readOnly); mapper.addValue("is_unmanaged", isUnmanaged); return mapper; }

Target:
protected MapSqlParameterSource createFullParametersMapper(Provider<?> entity) { MapSqlParameterSource mapper = createBaseProviderParametersMapper(entity); String tenantName = null; String pluginType = null; boolean readOnly = false; boolean isUnmanaged = false; AgentConfiguration agentConfiguration = null; AdditionalProperties additionalProperties = null; if (entity.getAdditionalProperties() != null) { switch (entity.getType()) { case EXTERNAL_NETWORK: case OPENSTACK_NETWORK: OpenstackNetworkProviderProperties networkProperties = (OpenstackNetworkProviderProperties) entity.getAdditionalProperties(); readOnly = networkProperties.getReadOnly(); isUnmanaged = entity.getIsUnmanaged(); tenantName = networkProperties.getTenantName(); pluginType = networkProperties.getPluginType(); agentConfiguration = networkProperties.getAgentConfiguration(); break; case OPENSTACK_IMAGE: OpenStackImageProviderProperties imageProperties = (OpenStackImageProviderProperties) entity.getAdditionalProperties(); tenantName = imageProperties.getTenantName(); break; case OPENSTACK_VOLUME: OpenStackVolumeProviderProperties volumeProperties = (OpenStackVolumeProviderProperties) entity.getAdditionalProperties(); tenantName = volumeProperties.getTenantName(); break; case VMWARE: case KVM: case XEN: additionalProperties = entity.getAdditionalProperties(); break; default: break; } } mapper.addValue("tenant_name", tenantName); mapper.addValue("plugin_type", pluginType); mapper.addValue("agent_configuration", SerializationFactory.getSerializer().serialize(agentConfiguration)); mapper.addValue("additional_properties", SerializationFactory.getSerializer().serialize(additionalProperties)); mapper.addValue("read_only", readOnly); return mapper; }