Skip to content

Instantly share code, notes, and snippets.

@tmoreira2020
Created February 21, 2020 19:49
Show Gist options
  • Save tmoreira2020/296a0f6e23072c36bb3ab8bb88698561 to your computer and use it in GitHub Desktop.
Save tmoreira2020/296a0f6e23072c36bb3ab8bb88698561 to your computer and use it in GitHub Desktop.
Populate Regions for Brazil
// ### Groovy Sample ###
countryId=48;
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "AL", "Alagoas", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "AM", "Amazonas", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "AP", "Amapá", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "BA", "Bahia", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "CE", "Ceará", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "DF",
"Distrito Federal", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "ES", "Espírito Santo",
true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "GO", "Goiás", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "MA", "Maranhão", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "MG", "Minas Gerais",
true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "MS",
"Mato Grosso do Sul", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "MT", "Mato Grosso",
true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "PA", "Pará", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "PB", "Paraíba", true);
com.liferay.portal.kernel.service.RegionServiceUtil
.addRegion(countryId, "PE", "Pernambuco", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "PI", "Piauí", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "PR", "Paraná", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "RJ", "Rio de Janeiro",
true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "RN",
"Rio Grande do Norte", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "RR", "Roraima", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "RO", "Rondônia", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "RS",
"Rio Grande do Sul", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "SC", "Santa Catarina",
true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "SE", "Sergipe", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "SP", "São Paulo", true);
com.liferay.portal.kernel.service.RegionServiceUtil.addRegion(countryId, "TO", "Tocantins", true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment