blob: 9b38c348e534c83673974d028f18ad4615fbb90a [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.ecview.extension.presentation.converter;
import java.util.Locale;
import com.vaadin.data.util.converter.Converter;
import org.eclipse.osbp.ecview.extension.model.converter.CxPriceToStringConverter;
// TODO DOM --> See QuantityToStringConverter
@SuppressWarnings("serial")
public class PriceToStringConverter implements Converter<String, Object> {
private CxPriceToStringConverter cxConverter;
@Override
public Object convertToModel(String value,
Class<? extends Object> targetType, Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException {
return value;
}
@Override
public String convertToPresentation(Object value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException {
return value.toString();
}
@Override
public Class<Object> getModelType() {
return Object.class;
}
@Override
public Class<String> getPresentationType() {
return String.class;
}
}