View Javadoc

1   package org.kuali.student.common.conversion.util.converter;
2   
3   import org.dozer.DozerConverter;
4   import org.kuali.student.r2.common.dto.LocaleInfo;
5   
6   public class LocaleInfoConverter extends DozerConverter<String, LocaleInfo> {
7   
8       public LocaleInfoConverter() {
9           super(String.class, LocaleInfo.class);
10      }
11  
12      @Override
13      public LocaleInfo convertTo(String source, LocaleInfo destination) {
14          LocaleInfo localeInfo = new LocaleInfo();
15          localeInfo.setLocaleLanguage(source);
16          return localeInfo;
17      }
18  
19      @Override
20      public String convertFrom(LocaleInfo source, String destination) {
21          return source.getLocaleLanguage();
22      }
23  
24  }