/*
     * (non-Javadoc)
     * @see org.springframework.core.convert.converter.GenericConverter#convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
     */
    @Override
    public final Object convert(
        Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {

      NullableWrapper wrapper = (NullableWrapper) source;
      Object value = wrapper.getValue();

      // TODO: Add Recursive conversion once we move to Spring 4
      return value == null ? getNullValue() : wrap(value);
    }
Exemplo n.º 2
0
 public void setData(JsonStringWrapper data) {
   this.data = NullableWrapper.create(data);
 }
Exemplo n.º 3
0
 public JsonStringWrapper getData() {
   return NullableWrapper.value(data);
 }
Exemplo n.º 4
0
 public void setType(String type) {
   this.type = NullableWrapper.create(type);
 }
Exemplo n.º 5
0
 public String getType() {
   return NullableWrapper.value(type);
 }
Exemplo n.º 6
0
 public void setCode(String code) {
   this.code = NullableWrapper.create(code);
 }
Exemplo n.º 7
0
 public String getCode() {
   return NullableWrapper.value(code);
 }
Exemplo n.º 8
0
 public void setName(String name) {
   this.name = NullableWrapper.create(name);
 }
Exemplo n.º 9
0
 public String getName() {
   return NullableWrapper.value(name);
 }