Date now = new Date();
long locationId = counterLocalService.increment(
Location.class.getName());
Location location = locationPersistence.create(locationId);
location.setName(name);
location.setDescription(description);
location.setStreetAddress(streetAddress);
location.setCity(city);
location.setStateOrProvince(stateOrProvince);
location.setCountry(country);
location.setGroupId(groupId);
location.setCompanyId(user.getCompanyId());
location.setUserId(user.getUserId());
location.setCreateDate(serviceContext.getCreateDate(now));
location.setModifiedDate(serviceContext.getModifiedDate(now));
super.addLocation(location);
return location;
}