blob: e5007e9fd8430d5f5c5279b0c0d2fabc834b2df9 [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 v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* 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;
}
}