1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.linecorp.centraldogma.internal.thrift;
18
19 import com.google.common.base.Converter;
20
21
22
23
24
25 public final class AuthorConverter extends Converter<com.linecorp.centraldogma.common.Author, Author> {
26 public static final Converter<com.linecorp.centraldogma.common.Author, Author> TO_DATA =
27 new AuthorConverter();
28
29 public static final Converter<Author, com.linecorp.centraldogma.common.Author> TO_MODEL =
30 TO_DATA.reverse();
31
32 private AuthorConverter() {}
33
34 @Override
35 protected Author doForward(com.linecorp.centraldogma.common.Author author) {
36 return new Author(author.name(), author.email());
37 }
38
39 @Override
40 protected com.linecorp.centraldogma.common.Author doBackward(Author author) {
41 return new com.linecorp.centraldogma.common.Author(author.getName(), author.getEmail());
42 }
43 }