use of org.orcid.persistence.jpa.entities.AddressEntity in project ORCID-Source by ORCID.
the class MapperFacadeFactory method getAddressMapperFacade.
public MapperFacade getAddressMapperFacade() {
MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
ClassMapBuilder<Address, AddressEntity> addressClassMap = mapperFactory.classMap(Address.class, AddressEntity.class);
addV3DateFields(addressClassMap);
registerSourceConverters(mapperFactory, addressClassMap);
addressClassMap.field("putCode", "id");
addressClassMap.field("country.value", "iso2Country");
addressClassMap.field("visibility", "visibility");
addressClassMap.fieldBToA("displayIndex", "displayIndex");
addressClassMap.byDefault();
addressClassMap.register();
return mapperFactory.getMapperFacade();
}
Aggregations