class ListOfValuesResourceConverter extends ResourceConverterImpl<ListOfValues, ClientListOfValues> {

    @Override
    protected ListOfValues resourceSpecificFieldsToServer(ClientListOfValues clientObject, ListOfValues resultToUpdate, List<Exception> exceptions, ToServerConversionOptions options) throws IllegalParameterValueException {
        for (ListOfValuesItem existing : resultToUpdate.getValues()){
            resultToUpdate.removeValue(existing);
        }

        final List<ClientListOfValuesItem> items = clientObject.getItems();
        if(items != null){
            for(ClientListOfValuesItem currentItem : items){
                ListOfValuesItem serverItem = new ListOfValuesItemImpl();
                serverItem.setLabel(currentItem.getLabel());
                serverItem.setValue(currentItem.getValue());
                resultToUpdate.addValue(serverItem);
            }
        }
        return resultToUpdate;
    }

}