Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.zalando.typemapper.core.fieldMapper;
 
 
 public class ValueTransformerFieldMapper implements FieldMapper {
 
     private final ValueTransformer<?, ?> valueTransformer;
 
     public ValueTransformerFieldMapper(final Class<? extends ValueTransformer<?, ?>> valueTransformer)
        this. = valueTransformer.newInstance();
    }
    public ValueTransformerFieldMapper(final ValueTransformer<?, ?> valueTransformer) {
        this. = valueTransformer;
    }
    @Override
    public Object mapField(final String stringfinal Class<?> clazz) {
        if (string == null) {
            return null;
        }
        if ( != null) {
            return .unmarshalFromDb(string);
        }
        return null;
    }
New to GrepCode? Check out our FAQ X