1
2
3
4
5
6
7
8
9
10
11 package org.csveed.test.converters;
12
13 import org.csveed.bean.conversion.AbstractConverter;
14 import org.csveed.test.model.BeanSimple;
15
16
17
18
19 public class BeanSimpleConverter extends AbstractConverter<BeanSimple> {
20
21
22
23
24 public BeanSimpleConverter() {
25 super(BeanSimple.class);
26 }
27
28 @Override
29 public BeanSimple fromString(String text) throws Exception {
30 BeanSimple bean = new BeanSimple();
31 bean.setName(text);
32 return bean;
33 }
34
35 @Override
36 public String toString(BeanSimple value) throws Exception {
37 return value.getName();
38 }
39
40 }