class DataSourceHolderResourceConverter extends ResourceConverterImpl<ResourceType, ClientType> {

    @Override
    protected ResourceType genericFieldsToServer(ClientType clientObject, ResourceType resultToUpdate, ToServerConversionOptions options)
            throws IllegalParameterValueException, MandatoryParameterNotFoundException {
        resultToUpdate = super.genericFieldsToServer(clientObject, resultToUpdate, options);
        ResourceReference dataSourceReference = resourceReferenceConverterProvider
                .getConverterForType(ClientReferenceableDataSource.class)
                .toServer(clientObject.getDataSource(), getDataSourceFromResource(resultToUpdate), options);
        setDataSourceToResource(dataSourceReference, resultToUpdate);
        return resultToUpdate;
    }

}