@Override
  public Location toEntityModel() {
    LocationImpl locationImpl = new LocationImpl();

    locationImpl.setLocationId(locationId);
    locationImpl.setCompanyId(companyId);
    locationImpl.setGroupId(groupId);
    locationImpl.setUserId(userId);

    if (createDate == Long.MIN_VALUE) {
      locationImpl.setCreateDate(null);
    } else {
      locationImpl.setCreateDate(new Date(createDate));
    }

    if (modifiedDate == Long.MIN_VALUE) {
      locationImpl.setModifiedDate(null);
    } else {
      locationImpl.setModifiedDate(new Date(modifiedDate));
    }

    if (name == null) {
      locationImpl.setName(StringPool.BLANK);
    } else {
      locationImpl.setName(name);
    }

    if (description == null) {
      locationImpl.setDescription(StringPool.BLANK);
    } else {
      locationImpl.setDescription(description);
    }

    if (streetAddress == null) {
      locationImpl.setStreetAddress(StringPool.BLANK);
    } else {
      locationImpl.setStreetAddress(streetAddress);
    }

    if (city == null) {
      locationImpl.setCity(StringPool.BLANK);
    } else {
      locationImpl.setCity(city);
    }

    if (stateOrProvince == null) {
      locationImpl.setStateOrProvince(StringPool.BLANK);
    } else {
      locationImpl.setStateOrProvince(stateOrProvince);
    }

    if (country == null) {
      locationImpl.setCountry(StringPool.BLANK);
    } else {
      locationImpl.setCountry(country);
    }

    locationImpl.resetOriginalValues();

    return locationImpl;
  }