@Test public void exchangeで指定したキーに変換される() { Map<String, Object> source = Maps .hash("name", (Object)"nameValue") .map("exId", 1); MapToBeanPorter porter = new MapToBeanPorter(source); MapToBeanPorterTestSourceBean dest = porter.exchange("exId", "id").create(MapToBeanPorterTestSourceBean.class); assertThat(dest, notNullValue()); assertThat(dest.getId(), is(1)); assertThat(dest.getName(), is("nameValue")); MapToBeanPorterTestSourceBean afterClearBean = porter.clearExchange().create(MapToBeanPorterTestSourceBean.class); assertThat(afterClearBean, notNullValue()); assertThat(afterClearBean.getId(), nullValue()); assertThat(afterClearBean.getName(), is("nameValue")); }
public MapToBeanPorter exchange(String src, String dest) { Args.checkNotEmpty(src); Args.checkNotEmpty(dest); exchanger.exchange(src, dest); return this; }
MapToBeanPorter extends Porter { public MapToBeanPorter exchange(String src, String dest) { Args.checkNotEmpty(src); Args.checkNotEmpty(dest); exchanger.exchange(src, dest); return this; } }
MapToBeanPorter extends Porter { public MapToBeanPorter exchange(String src, String dest) { Args.checkNotEmpty(src); Args.checkNotEmpty(dest); exchanger.exchange(src, dest); return this; } MapToBeanPorter();  MapToBeanPorter(Map<String, ?> source); }
MapToBeanPorter extends Porter { public MapToBeanPorter exchange(String src, String dest) { Args.checkNotEmpty(src); Args.checkNotEmpty(dest); exchanger.exchange(src, dest); return this; } MapToBeanPorter();  MapToBeanPorter(Map<String, ?> source); T create(Class<T> beanClass); MapToBeanPorter exchange(String src, String dest); MapToBeanPorter clearExchange(); MapToBeanPorter convert(Class<T> conversionType, TypeConverter<T> op); MapToBeanPorter clearConverter(); MapToBeanPorter ignore(String columnName); MapToBeanPorter clearIgnorance(); }
MapToBeanPorter extends Porter { public MapToBeanPorter exchange(String src, String dest) { Args.checkNotEmpty(src); Args.checkNotEmpty(dest); exchanger.exchange(src, dest); return this; } MapToBeanPorter();  MapToBeanPorter(Map<String, ?> source); T create(Class<T> beanClass); MapToBeanPorter exchange(String src, String dest); MapToBeanPorter clearExchange(); MapToBeanPorter convert(Class<T> conversionType, TypeConverter<T> op); MapToBeanPorter clearConverter(); MapToBeanPorter ignore(String columnName); MapToBeanPorter clearIgnorance();  }