if (logger.isInfoEnabled()) logger.info("Executing startup task [GenerateAddressTypesTableDataStartupTask]");
Long count = (Long) dao.executeQuery("SELECT COUNT(a) FROM AddressType a").get(0);
if (count <= 0) {
if (logger.isInfoEnabled()) logger.info("AddressType table is empty. Generating data...");
Properties allTypes = addressTypes.entrySet().iterator().next().getValue();
for (String code : allTypes.stringPropertyNames()) {
if (logger.isDebugEnabled()) logger.debug("Creating address type [" + code + "]");
try {
AddressType type = new AddressType();
type.setType(new I18nText());
for (Locale locale : addressTypes.keySet())