protected Location toUnwrappedModel(Location location) {
if (location instanceof LocationImpl) {
return location;
}
LocationImpl locationImpl = new LocationImpl();
locationImpl.setNew(location.isNew());
locationImpl.setPrimaryKey(location.getPrimaryKey());
locationImpl.setLocationId(location.getLocationId());
locationImpl.setName(location.getName());
locationImpl.setDescription(location.getDescription());
locationImpl.setStreetAddress(location.getStreetAddress());
locationImpl.setCity(location.getCity());
locationImpl.setStateOrProvince(location.getStateOrProvince());
locationImpl.setCountry(location.getCountry());
locationImpl.setCompanyId(location.getCompanyId());
locationImpl.setGroupId(location.getGroupId());
locationImpl.setUserId(location.getUserId());
locationImpl.setCreateDate(location.getCreateDate());
locationImpl.setModifiedDate(location.getModifiedDate());
return locationImpl;
}