View Javadoc
1   package org.csveed.test.converters;
2   
3   import org.csveed.bean.conversion.AbstractConverter;
4   import org.csveed.test.model.BeanSimple;
5   
6   public class BeanSimpleConverter extends AbstractConverter<BeanSimple> {
7   
8       public BeanSimpleConverter() {
9           super(BeanSimple.class);
10      }
11  
12      @Override
13      public BeanSimple fromString(String text) throws Exception {
14          BeanSimplele.html#BeanSimple">BeanSimple bean = new BeanSimple();
15          bean.setName(text);
16          return bean;
17      }
18  
19      @Override
20      public String toString(BeanSimple value) throws Exception {
21          return value.getName();
22      }
23  
24  }