Class IPLocation

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.IPLocation
All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, Cacheable

public class IPLocation extends DatabaseBean
A bean to store IP block geolocation data.
Since:
8.7
Version:
8.7
Author:
Luke
See Also:
  • Constructor Details

    • IPLocation

      public IPLocation(int id)
      Creates a location bean.
      Parameters:
      id - the GeoNames ID
  • Method Details

    • getCountry

      public Country getCountry()
      Returns the country.
      Returns:
      the country
    • getRegionCode

      public String getRegionCode()
      Returns the region/state/province code.
      Returns:
      the code
    • getRegion

      public String getRegion()
      Returns the region/state/province name.
      Returns:
      the name
    • getCityName

      public String getCityName()
      Returns the city name.
      Returns:
      the city
    • setCountry

      public void setCountry(Country c)
      Updates the country.
      Parameters:
      c - a Country
    • setRegionCode

      public void setRegionCode(String code)
      Updates the region code.
      Parameters:
      code - the code
    • setRegion

      public void setRegion(String name)
      Updates the region name.
      Parameters:
      name - the name
    • setCityName

      public void setCityName(String name)
      Updates the city name.
      Parameters:
      name - the city