class DataSourceHolderResourceConverter extends ResourceConverterImpl<ResourceType, ClientType> {

    @Override
    protected ClientType genericFieldsToClient(ClientType client, ResourceType serverObject, ToClientConversionOptions options) {
        final ResourceReference dataSource = getDataSourceFromResource(serverObject);
        client.setDataSource(resourceReferenceConverterProvider.getConverterForType(ClientReferenceableDataSource.class)
                .toClient(dataSource, options));
        return super.genericFieldsToClient(client, serverObject, options);
    }

}