コード例 #1
0
/** Created by jdeyoung on 11/3/15. */
public class EntityMentionConverter
    extends DozerConverter<adept.common.EntityMention, thrift.adept.common.EntityMention> {

  private static final ThriftAdeptMapper instance = ThriftAdeptMapper.getInstance();

  public EntityMentionConverter() {
    super(adept.common.EntityMention.class, thrift.adept.common.EntityMention.class);
  }

  @Override
  public EntityMention convertTo(
      final adept.common.EntityMention entityMention, final EntityMention entityMention2) {
    if (entityMention == null) {
      return null;
    }
    return instance.convert(entityMention);
  }

  @Override
  public adept.common.EntityMention convertFrom(
      final EntityMention entityMention, final adept.common.EntityMention entityMention2) {
    if (entityMention == null) {
      return null;
    }
    return instance.convert(entityMention);
  }
}
コード例 #2
0
 @Override
 public adept.common.EntityMention convertFrom(
     final EntityMention entityMention, final adept.common.EntityMention entityMention2) {
   if (entityMention == null) {
     return null;
   }
   return instance.convert(entityMention);
 }