de.alpharogroup.address.book.service.api.ZipcodesService.getZipcode()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中de.alpharogroup.address.book.service.api.ZipcodesService.getZipcode()方法的一些代码示例,展示了ZipcodesService.getZipcode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipcodesService.getZipcode()方法的具体详情如下:
包路径:de.alpharogroup.address.book.service.api.ZipcodesService
类名称:ZipcodesService
方法名:getZipcode

ZipcodesService.getZipcode介绍

[英]Gets the Zipcodes object from the given zipcode string and city. If it does not exist it will be create a new Zipcodes object.
[中]从给定的zipcode字符串和城市获取Zipcodes对象。如果它不存在,将创建一个新的Zipcodes对象。

代码示例

代码示例来源:origin: de.alpharogroup/address-book-domain

/**
 * {@inheritDoc}
 */
@Override
public Zipcode getZipcode(String zipcode, String city)
{
  return getMapper().toDomainObject(zipcodesService.getZipcode(zipcode, city));
}

代码示例来源:origin: de.alpharogroup/address-book-business

/**
 * {@inheritDoc}
 */
@Override
public Addresses createAddress(final String street, final String streetnumber,
  final String addressComment, final String zipcode, final String city,
  final String federalstate)
{
  final Zipcodes zc = zipcodesService.getZipcode(zipcode, city);
  Federalstates federalstates;
  if (zc != null && zc.getCountry() != null)
  {
    federalstates = federalstatesService.findFederalstate(zc.getCountry(), federalstate);
  }
  else
  {
    federalstates = federalstatesService.findFederalstateFromIso3166A2code(federalstate);
  }
  final Addresses address = AddressBookFactory.getInstance().newAddresses(addressComment,
    federalstates, null, null, null, street, streetnumber, zc);
  return address;
}

代码示例来源:origin: de.alpharogroup/address-book-business

/**
 * {@inheritDoc}
 */
@Override
public Addresses createAddress(final String street, final String streetnumber,
  final String addressComment, final String zipcode, final String city,
  final String federalstate, final String geohash, final java.math.BigDecimal latitude,
  final java.math.BigDecimal longitude)
{
  final Zipcodes zip = zipcodesService.getZipcode(zipcode, city);
  Federalstates federalstates;
  if (zip != null && zip.getCountry() != null)
  {
    federalstates = federalstatesService.findFederalstate(zip.getCountry(), federalstate);
  }
  else
  {
    federalstates = federalstatesService.findFederalstateFromIso3166A2code(federalstate);
  }
  final Addresses address = AddressBookFactory.getInstance().newAddresses(addressComment,
    federalstates, geohash, latitude, longitude, street, streetnumber, zip);
  return address;
}

相关文章