本文整理了Java中de.alpharogroup.address.book.service.api.ZipcodesService
类的一些代码示例,展示了ZipcodesService
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipcodesService
类的具体详情如下:
包路径:de.alpharogroup.address.book.service.api.ZipcodesService
类名称:ZipcodesService
[英]The interface ZipcodesService.
[中]接口ZipCodes服务。
代码示例来源:origin: de.alpharogroup/address-book-business
/**
* {@inheritDoc}
*/
@Override
@Deprecated
public Map<Countries, List<Zipcodes>> getCountriesToZipcodesMap()
{
if (this.countriesToZipcodesMap == null)
{
this.countriesToZipcodesMap = new LinkedHashMap<Countries, List<Zipcodes>>();
List<Countries> countries = findAll();
Collections.sort(countries, new Comparator<Countries>()
{
@Override
public int compare(Countries o1, Countries o2)
{
return o1.getName().compareTo(o2.getName());
}
});
for (Countries country : countries)
{
List<Zipcodes> zipcodes = zipcodesService.find(country);
this.countriesToZipcodesMap.put(country, zipcodes);
}
}
return this.countriesToZipcodesMap;
}
代码示例来源: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-domain
/**
* {@inheritDoc}
*/
@Override
public void deleteAllZipcodes()
{
zipcodesService.deleteAllZipcodes();
}
代码示例来源:origin: de.alpharogroup/address-book-domain
/**
* {@inheritDoc}
*/
@Override
public Zipcode findCityFromZipcode(Country country, String zipcode)
{
return getMapper().toDomainObject(zipcodesService
.findCityFromZipcode(getMapper().map(country, Countries.class), zipcode));
}
代码示例来源:origin: de.alpharogroup/address-book-domain
/**
* {@inheritDoc}
*/
@Override
public boolean existsZipcode(String zipcode)
{
return zipcodesService.existsZipcode(zipcode);
}
代码示例来源:origin: de.alpharogroup/address-book-domain
/**
* {@inheritDoc}
*/
@Override
public List<Zipcode> findZipcodes(String zipcode)
{
return getMapper().toDomainObjects(zipcodesService.findZipcodes(zipcode));
}
代码示例来源:origin: de.alpharogroup/address-book-domain
/**
* {@inheritDoc}
*/
@Override
public List<Zipcode> findAll(Country country, String zipcode, String city)
{
Countries c = getMapper().map(country, Countries.class);
return getMapper().toDomainObjects(zipcodesService.findAll(c, zipcode, city));
}
代码示例来源:origin: de.alpharogroup/address-book-business
Zipcodes zipcode = getZipcodesService().findCityFromZipcode(country, zc);
if (zipcode != null)
代码示例来源:origin: de.alpharogroup/address-book-business
for (Countries country : countries)
List<Zipcodes> zipcodes = zipcodesService.find(country);
this.germanCountriesToZipcodesMap.put(country, zipcodes);
代码示例来源:origin: de.alpharogroup/address-book-business
Zipcodes zipcode = getZipcodesService().findCityFromZipcode(country,
modelObject.getZipcode());
if (zipcode != null)
代码示例来源: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-domain
/**
* {@inheritDoc}
*/
@Override
public List<Zipcode> find(Country country)
{
List<Zipcode> zcs = new ArrayList<>();
if (country != null)
{
Countries countries = getMapper().map(country, Countries.class);
return getMapper().toDomainObjects(zipcodesService.find(countries));
}
return zcs;
}
代码示例来源: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;
}
代码示例来源:origin: de.alpharogroup/address-book-business
/**
* {@inheritDoc}
*/
@Override
public List<KeyValuesPair<Countries, Zipcodes>> getCountriesToZipcodesList()
{
if (this.countriesToZipcodesList == null)
{
this.countriesToZipcodesList = new ArrayList<>();
List<Countries> countries = findAll();
Collections.sort(countries, new Comparator<Countries>()
{
@Override
public int compare(Countries o1, Countries o2)
{
return o1.getName().compareTo(o2.getName());
}
});
for (Countries country : countries)
{
List<Zipcodes> zipcodes = zipcodesService.find(country);
this.countriesToZipcodesList.add(KeyValuesPair.<Countries, Zipcodes> builder()
.key(country).values(zipcodes).build());
}
}
return this.countriesToZipcodesList;
}
代码示例来源:origin: de.alpharogroup/address-book-business
for (Countries country : countries)
List<Zipcodes> zipcodes = zipcodesService.find(country);
this.germanCountriesToZipcodesList.add(KeyValuesPair.<Countries, Zipcodes> builder()
.key(country).values(zipcodes).build());
内容来源于网络,如有侵权,请联系作者删除!